When TOPLink generate tables, the type of column roldID in table OAUser is varchar(255), and the foreign key generation failed, why?
Toplink execute "ALTER TABLE OAUSER ADD CONSTRAINT FK_OAUSER_roleID FOREIGN KEY (roleID) REFERENCES OAROLE (id)" and encounter an error, because the roleID column in OAUSER is varchar type and the id in OAROLE is number type.
"If you are joining on something other than the primary-key column of the ADDRESS table, then you must use the referencedColumnName( ) attribute.This referencedColumnName() must be unique, since this is a one-to-one relationship." I find this in "Enterprise Java Beans 3.0", it seemed that I misunderstand the referencedColumnName attribute. In my case, the roleID in OAUser is a foreign key reference the OARole table's id column which is defined as PK of OARole table.
No difference edition doesn't work in my NetBeans6.5 before I comment that referencedColumnName="BILLING_ID" attribute ("roleID" in my code).
are you saying that this is a problem with the Netbeans version?In that case i would say no because i am using Netbeans 6.0 and i am facing the same problem you faced(uncommenting referencedcolumnName worked for me).