Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6176425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:06:01+00:00 2026-05-24T00:06:01+00:00

Working on an MVC application with Doctrine as our ORM. Currently we’re looking at

  • 0

Working on an MVC application with Doctrine as our ORM. Currently we’re looking at improving the way we use object relations within our application, and a question came up:

Should we directly assign a doctrine entity to the view or just an array of data?

Each has it’s own advantages and disadvantages. For example, setting an entity gives our frontend devs the ability to query our database, which shouldn’t be done it the view and could be used unwisely.
On the other hand, assigning an array of data means we have to first query everything they could possibly want and fetch as array. Array access also doesn’t give them autocompletion.

Which do you think is our best option going forward with the least amount of potential complications?

Thanks for your time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:06:02+00:00Added an answer on May 24, 2026 at 12:06 am

    I think the answer is mostly about the efficiency/speed at which your app needs to operate. If by “frontend devs” you mean HTML/CSS devs, then they probably won’t understand what kinds of queries looping the wrong thing (e.g. $object->getRelatedObject()) can create in the background. Something that could be performed with a single tight query returning array data may end up generating 10-15 queries that hydrate full objects and slow down the application noticeably.

    If I had to generalize, I’d say that if you’re building a small app where scaling up isn’t a major concern, it doesn’t really matter because you won’t notice the speed hit and your devs have more leeway to do nasty things. Otherwise, I’d go for array data.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on an MVC application where I use a lot of
I am currently working on my first asp.net mvc application. I am trying to
I'm currently working on an Asp.net MVC Web application. In my solution, there're two
I'm working on multilingual Asp.NET MVC application. In url i need to use category
I am working on a ASP.NET MVC application where we have to write our
First some background, I am currently working on a relatively large Asp.Net MVC application
I'm currently working on a ASP MVC application. And was wondering if there is
I am working on an ASP.NET MVC application that contains a header and menu
I am working on an ASP.NET MVC application where I need to export data
I'm working on an ASP.NET MVC application. The app is broken up into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.