MyEclipse: one to one detection
sergiocg80 - Dec 22, 2011 - 01:54 PM
Post subject: one to one detection
I'm trying to map a one to one database relation using myeclipse JPA generation tool. I have two tables, User and Manufacturer, and each one has it's own primary key. User has a column id_manufacturer, which has a UNIQUE foreign key to the PK of Manufacturer, and may be null.
MyEclipse does generate the correct mappings, but each entity shows the following error: <In attribute 'manufacturer', the "mapped by" attribute 'user' also maps this attribute. Every relationship must have an owner.> And viceversa.
What am I doing wrong? I read that I can make a one-to-one relationship just adding a FK between primary keys of the two tables. I can' t do this in my scenario because the FK is nullable.
support-joy - Dec 26, 2011 - 09:17 PM
Please provide below details to help me investigate further -
1. Open MyEclipse IDE, from menu options click on MyEclipse > Installation Summary > Installation Details and copy and paste the same here
2. Attach screenshot of the issue to help me get a visual
3. Clear your .log file located at [your workspace dir]/.metadata/.log, replicate issue and attach file here
4. Could you send the schema for tables - User and Manufacturer?
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits