Thread:
 Additional considerations 
 rkischuk   17 Aug 2004, 00:02 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: rkischuk (17 Aug 2004, 00:02) Replies: 0, Views: 38075
Subject: Additional considerations
It's worth noting that if you have a DocumentBook class that has both a
Document attribute and a DocumentInfo attribute, you will need to take
several steps to avoid conflicts between these objects:

1. Make both relationships outer-join="false" (remember, both items
can't be loaded at the same time)

2. Make both referenced classes have a proxy, so they will be lazily
loaded.  proxy="Document" and proxy="DocumentInfo" will suffice. (same
reason as #1)


3. Make the table for Document different from the table for DocumentInfo
using case sensitivity (eg: DOCUMENTS and documents).  Otherwise, when
you load one (using a join fetch), Hibernate may attempt to load the
eagerly fetched entity into both the detail and summary fields.  If a
summary object is loaded into a detail field, class matching issues will
result.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]