• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Can a CMR field be part of a compound primary key

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a table (table X) having a CMR with another table (table Y). Now my design is such that the CMR field should form the compoung key of table X. Is this allowed in EJB. Can a CMR field be a part of compound key. I am using ejbgen which mandates that a primary key field should be a CMP field. My other question how to define a field as both CMR field and CMP field using EJBGen.
thanx
Bala

While compiling EJBGEn gave me the following error...
javadoc: In doclet class weblogic.tools.ejbgen.EJBGen, method start has thrown an exception java.lang.reflect.InvocationTargetException
weblogic.tools.ejbgen.EJBGenException: [BlockedAddressProfileBean] getEnterpriseProfile() was indicated as a primkey-field
but not as a CMP field. You need to specify an @ejbgen:cmp-field for
this method.
 
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends on which persistence layer you use. In Toplink, your situation is valid. In Weblogic7.0, I am not able to acheive it.
 
Honk if you love justice! And honk twice for tiny ads!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic