1. Limit associated entities loaded through a Hibernate Criteria stackoverflow.comIs it possible to limit the number of associated entities fetched through a Hibernate Criteria? Consider the following two entities:
|
2. Hibernate generating SQL queries when accessing associated entity's id stackoverflow.comI have Hibernate Entities that look something like this (getters and setters left out):
|
3. Hibernate not loading associated object stackoverflow.comi am trying to load a hibernate object ForumMessage but in it contain another object Users and the Users object is not being loaded. My ForumMessage Mapping File:
|
4. Hibernate not loading associated collection coderanch.comI have two tables called proj and proj_team_member. The persistant classes for these two are Project and ProjectTeam. There is an association between the two tables. A project can have multiple team members. The table proj_team_member has a composite primary key on columns proj_id, role_id and person_pin This is how I have implemented the bi-directional navigation. I have created a Set ... |
5. lazy loading within a (large) associated collection forum.hibernate.orgI apologize if this is covered somewhere in documentation; I haven't been able to find it. I have a uni-directional one-to-many relationship defined by a |
6. createQuery load object where associated relation value=? forum.hibernate.orgHi all, I am a sort of beginner to hibernatre, and using only XML-Mapping in hibernate mapping file. If two enties are assciated with each other with one-to-one or one-to-many or many-to-one or many-to-many relationship, eg Parent assciated with children, so I want to load parent where children_id=?, or load the children object where parent_id=?. To be more specific I have ... |
7. Associate new Object behaviour like loaded object behaviour forum.hibernate.orgPass actual User and Role objects to a constructor instead of passing just the foreign keys, and then construct it using those objects. Code: public UserRole(User user, Role role, Date dateEntered) { this.user = user; user.getUserRoles.add(this); this.role = role; role.getUserRoles.add(this); this.dateEntered = dateEntered; } The this.user = user and user.getUserRoles.add(this) will associate the User object to the UserRole and vice versa, ... |
8. Loading associated objects using HQL forum.hibernate.orgHi, I am relatively new to Hibernate, I am trying to write a named query that loads an object and it's associated objects. I have an object USER which has two one-to-many associations with USERROLES and USEROBJECTS, USERROLES and USEROBJECTS are intermediate tables between USER and ROLES, USER and OBJECTS. I need to load both the associations in a single query. ... |
9. Problem when loading associated relation forum.hibernate.orgNewbie Joined: Wed May 21, 2008 2:17 am Posts: 2 Location: Hong Kong I've got problem when loading associated relation (the persistent collections) if the datatype of the key is CHAR. Supposing the length allowed in the key is 32. If the value of the key is just "333", I found that it works fine when using Criteria to retrieve the ... |