Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Composite Primary Key in CMP entity Bean??

Options
  • 14-02-2005 7:53pm
    #1
    Registered Users Posts: 194 ✭✭


    I'm using EJB 2.0 with Eclipse on a JBoss server with MySQL DB.

    I have an ArtistGenreBean entity. It contains two variables, artistID and genreID. Lomboz only allows me to select one primary key. I want to make both atristID and genreID a composite key.

    I have created a seperate primary key class that creates the composite key but every time I generate my EJB classes, the primary key class reference in my ejb-jar.xml file is overwritten to the original single primary key!

    Can i generate the composite key with Lomboz?

    Any help??
    Cheers.....
    Pat


Comments

  • Registered Users Posts: 194 ✭✭pbarry


    I got it workin! I created the CMP bean with a single primary key and then placed Lomboz primary key tags above the two fields necessary to make the composite primary key.

    Generated the EJB classes and a PK class was created......................


Advertisement