Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate's polymorphic collections - Which approach is faster?

 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Hibernate offers two ways to handle polymorphy.

One is to avoid a database hit and to use lazy loading and proxies with the session's load() method. The other to use interception and lazy="no-proxy" on the many-to-one side. For more, see the book Java Persistence with Hibernate on p.315 and p.571

Is there any statement that one approach is faster than the other

Any experiences here?

Regards,
Darya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic