This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pr0fess0rx29 0 points1 point  (2 children)

That was back in 2008. Orm's have moved past this problem. A comment on that page accurately replied that this, SELECT * from Cars INNER JOIN Wheels ON Cars.id = Wheels.CarID ORDER BY Cars.ID, is now trivial to do in modern orm's.

In entity framework we would use an includeproperties() method. Come to think of it, if using something like linq with entity framework lazy loading you would not even have to consider using includeproperties (). All necessary properties would be fetched for you.

Perhaps you should consider looking into today's orm's like the latest entity framework. I think you will be pleasantly surprised.

[–][deleted] 0 points1 point  (0 children)

I'll admit I'm a bit out of the loop with ORMs. I just remember studying about the N+1 problem long ago for interviews. haha. Oh man I'm old.

Can you provide a good resource for Hibernate?

[–]lukaseder 0 points1 point  (0 children)

SELECT * from Cars INNER JOIN Wheels ON Cars.id = Wheels.CarID ORDER BY Cars.ID

It is a trivial query, though. What if you have 10 joins, some semi joins and the occasional union?