1. Create/Update Hibernate association by just providing the foreign key stackoverflow.comI have two Hibernate entities named Alpha and Beta, and Alpha has a *-to-one association with Beta. I'd like to create a new Alpha entry in the database, with a reference ... |
2. Hibernate Many to Many association does not update database coderanch.comI am trying to insert record to a database using hibernate many to many association. There is something I miss but could not figure it out. Here are my files User.hbm.xml |
3. No update unidirectional one-to-one association w join table forum.hibernate.orgI'm trying out the example from here: http://docs.jboss.org/hibernate/core/3. ... l-join-121 When I create a person, set it's address and save, all tables are filled, Person,Address and PersonAddress. But when I set an address on an existing person and update, the address is saved but PersonAddress, the join table is not filled. This is the mapping (I just added cascade="all"): |
4. Association table not getting updated whe using many-to-many forum.hibernate.orgHibernate version:3.0 I have two tables - MEMBER and ACCOUNT, having many-to-many relationship by an association table - MEMBER_ACCOUNT. The database looks like: MEMBER TABLE: member_id NUMBER name VARCHAR(50) ACCOUNT TABLE: account_id NUMBER account_type VARCHAR(20) MEMBER_ACCOUNT TABLE: member_account_id NUMBER member_id NUMBER account_id NUMBER I have created two mapping files as follows: Member.hbm.xml ------------------------------ |
5. unnecessary update on unidirectional one-to-many association forum.hibernate.orgHi, I have read the Parent-Child Principles of Hibernate ( http://www.hibernate.org/209.html ). There bi-directional one-to-many associations are discussed mainly. I have an uni-directional one-to-many association. (There is no reference from the child to the parent in java. And there ist no many-to-one mapping in the mapping hbm of the child) And I have a problem that is described there as well: ... |
6. One-to-many association update forum.hibernate.orgHi I am looking at how will hibernate help me update the one to many association along with its parent. If i update an collection element for only one row out of the two rows, the one not updated, needs to get deleted. Hibernate updates the row correctly but doesnt delete the non-updated row. How do i go about acheiving this? ... |