Ok in my effort to go down to the bottom of this problem i made two discoveries:
1. The problem is not only with @PrimaryKeyColumns annotations or at least from what i found out.
I removed all the classes in my persistence unit and started adding them one by one startiing with simple ones, and before I only added two classes and i got the same error, the problem was this:
Code:
uniqueConstraints={@UniqueConstraint(columnNames={"RealmID","EntityName"})
for some reasons beyond my understanding hibernate doesn't like that annotation or at least if there are more than one columns, this was working fine with toplink + glassfish, please tell it got to be a bug.
2. second problem is this:
Code:
@GeneratedValue(strategy=GenerationType.IDENTITY,generator="RealmTypeSequence")
@javax.persistence.SequenceGenerator(name="RealmTypeSequence",sequenceName="realmtypeseq", allocationSize=5)
@Column(name="RealmTypeID",nullable=false,insertable=true,updatable=false)
these annotations are somewhat ignored, hibernate looks for the following sequence realmtype_realmtypeid_seq i'm on PostgreSQL 8.1 i dont want it to dictate what sequence name i should use, i want to to follow my instruction and use the sequence here in the annotation.
are these bugs or iam just missing something...