1. Components as composite identifiers and hashCode / equals forum.hibernate.org |
2. Retrieve next identifier for component forum.hibernate.orgFor some reason nobody wants to give a straight answer to this question :). The real reason is that the getIdentifierGenerator(...).generate(...) needn't always give the id. For e.g. in MySQL, if generator class is native and autoincrement is set on the table's primary key following is what hibernate would do 1/ insert the row without setting the id 2/ use MySQL's ... |
3. embedded composite identifier vs indetifier component forum.hibernate.orgI'm having trouble deciding how to model this relationship. My application has users who will comunicate with each other using a pair of email addresses specifically for them (so they can email eachother without disclosing their real address). So I have the folowing table: Code: create table EmailAddressPair ( UserID1 int unsigned not null references User(ID), ... |
4. Troubles with Components as composite identifiers forum.hibernate.orgRegular Joined: Tue Jun 08, 2004 8:24 am Posts: 57 I created the following mapping: Code: package org.test; public class InstitutionBase { private int id = -1; private String institutionNumber; private String productType; public int getId() { return id; ... |