Hierarchical Hibernate, how many queries are executed?

Posted by ghost1 on Stack Overflow See other posts from Stack Overflow or by ghost1
Published on 2010-05-18T18:03:28Z Indexed on 2010/05/27 1:51 UTC
Read the original article Hit count: 261

Filed under:
|
|
|

So I've been dealing with a home brew DB framework that has some seriously flaws, the justification for use being that not using an ORM will save on the number of queries executed.

If I'm selecting all possibile records from the top level of a joinable object hierarchy, how many separate calls to the DB will be made when using an ORM (such as Hibernate)?

I feel like calling bullshit on this, as joinable entities should be brought down in one query , right? Am I missing something here?

note: lazy initialization doesn't matter in this scenario as all records will be used.

© Stack Overflow or respective owner

Related posts about database

Related posts about hibernate