1. Associations by key forum.hibernate.orgHi, I am currently using Hibernate for persistence in DAO objects. My question is : can Hibernate handle associations based on keys instead of a direct reference ? What I mean is this : normally aProduct.getCustomer() returns an associated customer, but in some cases associations are maintained solely via key objects. In that case, aProduct.getCustomerKey() returns the key object of type ... |
2. Key generation of an association forum.hibernate.orgI have a table tournament which is associated to a tournament_option table and I would like to insert the tournament and the tournament_option at the same time. So, I change the cascade attribute to save-update but the problem is that the tournament_option key is null when I'm trying to insert the tournament instance. May I insert the tournament_option before the tournament ... |