facebook

Hibernate mappings with Foreign Key constraints

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #213879 Reply

    Mike Huston
    Member

    Hi, i’m usin 3.8.1 and i used the DB Explorer to create a hibernate mapping for a table that has 3 oracle foreign key references. All 3 references point to the same table. What i get in the abstract class is:
    /** The value of the userInfo association. */
    private UserInfo userInfo;

    /** The value of the userInfo1 association. */
    private UserInfo userInfo1;

    /** The value of the userInfo2 association. */
    private UserInfo userInfo2;

    The table’s 3 column’s are:
    USER_ID
    OWNER_ID
    CREATOR_ID

    Any idea how i can change the names to be more related to the columns? I can add a methods to the child class to handle this. However this only works as long as the foreign constraints are created in the same order. Any ideas to make the more managable would be great.
    Thanks,
    Mike

    #213895

    Riyad Kalla
    Member

    Mike,
    I’ve asked our hibernate dev to hvae a look-see at this.

    #213908

    support-jeff
    Member

    Mike –

    Your best shot is what you describe (or you can change the abstract mapped class, just as long as you do not intend to re-generate it from your tables). Future features will probably include more control over property naming, but you will have to wait for that.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Hibernate mappings with Foreign Key constraints

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