You must be using the same field as CMP as well as CMR field. That's the problem.. we had the same problem a week back..
There is a solution for this as well.
In JBoss the foreign key u have mapped in <key-field> and <column-name> will create a CMP field automatically(default behaviour of JBoss)..
You will have two entities having the same Key right!
So remove the CMP-field u have specified in one of the entities, where u don't have the same key as Primary key..
Hope this helps
Thank you for your response can you post an example of your tables and the relationship in the jbosscmp-jdbc.xml because when I try your suggestion to remove the cmp-field I get an
error saying that Invalid column name 'bidIdNo' but bid_id_no is the column name not bidIdNo thats the field name....
thanks for your help
Well I'm still having a problem with two column names being the same name....
Well I have attached my jbosscmp-jdbc.xml, and ejb-jar.xml.
I have a compoud primary so I have a primary key class everything deploys fine but when I run the client which is supposed to enter a item for the header it fails and says I have two companyNo columns listed. The relationship I have an entity bean called bidHeader and a bidItem entity bean it's a one to many relationship....
I also don't like I have a cmr field mapped to a cmp-field you can look at the attached files I just posted the code that I'm working with in this example thanks for any help.
Sorry this are the files....