eclipselink jpa association table mysql autoincrement problem
Hi,
I have problem inserting a record in the following scenario using Netbeans7.1-EclipseLink-Mysql
I have 3 tables:
A
B
A_B
the id Autogenerated primary key in A and B are autoincrement primary key on mysql db and the primary key on the A_B table has given by the A.I and B.Id fields.
The reverted generated entity classes are 4:
AEntity
BEntity
A_BEntity
A_BEntityPK
all with the relatives annotation.....@ManyToOne etc etc
I have tried to persist an AEntity Object Or a A_BEntityObject but I have always the same problem:
The A_BEntityPK object is not inizialized.If I initialize it a new Constructor It loss the integrity with A.PK and B.PK and goes in intergrity violation.It seems like it can retrieve the autogerated A.Pk and B.Pk to populate the A_B.PK Object.
Any ideas?
thanks