6 Replies Latest reply: Mar 22, 2018 10:49 AM by Stefan Wühl RSS

    How to Map a same FK twice?

    Jhonatan Vinicius Paulino de Morais

      Hello guys, I'm in trouble to import data from a table that use a field with different names twice. (each name refers to a different business context)

       

      Here is my entities:

       

      tb_issues

      id as issue_id  -- it is my (PK)

      title

      author_id as user_id  -- it is the user FK thats create the issue

      assigned_to_id as user_id -- it is the user FK thats receive the issue

      issue_parent_id as issue_id -- it is the (parent ) issue FK (relationship)


      tb_users

      id as user_id (PK)

      name


      i tried to map using user_id ou issue_id, but i reveived the error: Field names must be unique within table

       

      How can i map this fields in the right way?