MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
sergiocg80
Post subject: one to one detection  PostPosted: Dec 22, 2011 - 01:54 PM
Registered Member
Registered Member


Joined: Jul 26, 2011
Posts: 3

Hi,

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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-joy
Post subject:   PostPosted: Dec 26, 2011 - 09:17 PM
Registered Member
Registered Member


Joined: Feb 03, 2009
Posts: 3442

sergiocg80,

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?

_________________
Joy
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits