This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When you try to automatically generate classes from database tables, if there is a join table involved, Netbeans always creates a @ManytoMany annotation which is not always the desired behaviour. To reproduce: 1) Create database schema (ie in Oracle) create table A (a1 integer, a2 date, primary key (a1)); create table B (b1 integer, b2 date, primary key (b1)); create table A_B (a1 integer not null, b1 integer not null); alter table A_B add constraint uniqueB unique(b1); alter table A_B add constraint ab foreign key (a1) references A(a1); alter table A_B add constraint ba foreign key (b1) references B(b1); 2) Select New->Entity classes from Database 3) Look at the inferred code. The unique constraint that specifies a @OnetoMany relationship between A and B couldn't be correctly processed.
It seems this has been described and fixed as issue 90962. Thanks for filing it anyway. *** This issue has been marked as a duplicate of 90962 ***