Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Composite Primary Key in CMP Bean??

 
pat barry
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!