1. How to control eager subselect usage for collections? forum.hibernate.orgNewbie Joined: Fri May 15, 2009 3:11 pm Posts: 1 Hi, The nub of this post: can I *dynamically* control/override when subselect is used when eagerly fetching collections? Right now, I believe that: 1. If lazy=true, fetch=subselect is hardcoded in the hbm for collections, then there is no way to turn off eager fetching via subselect for any query (either critieria ... |
2. Eager ElementsCollections on eager fetched collection forum.hibernate.orgHi, We are working with Hebrnate 3.6 (Java 6, Weblogic 10.3.4, Oracle 11). We have the following entities in our system: BaseUser, which have eager fetched pockets collection (OneToMany with mappedBy on pockets -pocket has FK and ManyToOne reference to consumer). Pocket entity have eager fetched ElementsCollections which contains pocket locks - map of the lock types and the locks details. ... |
3. Hibernate initializes a collection eagerly only sometimes forum.hibernate.orgHi I'm trying to initialize a one-to-many collection eagerly using a Criteria Object. It works all right when I just do this: Criteria criteria = getSession().createCriteria(CallApprovable.class); criteria.add(Expression.eq("active", new Boolean(true))); criteria.setFetchMode("workflowEntry.currentSteps", FetchMode.EAGER); criteria.list(); Problem is, when I append this expression, hibernate does not initialize the collection anymore: if (callApprovableCriteria.getStepArray() != null && callApprovableCriteria.getStepArray().length > 0) { criteria.createCriteria("workflowEntry").createCriteria("currentSteps").add(Expression.in("stepId", callApprovableCriteria.getStepArray())); } I didn't know ... |
4. hash code and eager collections forum.hibernate.orgSo I have a simple relationship between 2 objects. I cannot share the code directly as it proprietary in nature. I could try to reproduce a dummy test that has the same issue; however before I go through that effort I wanted to see if there was anyone that could offer an explanation or solution to my problem off the top ... |