one to one detection

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #321915 Reply



    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.

    #321972 Reply



    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?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: one to one detection

You must be logged in to post in the forum log in