• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Q re on-to-one Relationships

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Any chance someone can answer my q in topic?
I include the key info for convenience:
I am currently needing to put together a one-to-one relationship and need to
understand the process if both beans need to have references to each other
as they are created. I am imagining it would go something like this (the
create method of one ejb takes enough params to create both, the create
method of the second takes a reference to the first and uses a combination
of create and postCreate to set up the persistent relationship):
bean 1 (name):
code:

(of course CreateExceptions etc ...)

Will this work? Is this the way to do it? Is there a better way?
Any thoughts?
Regards,
Matthew
SCJP, SCBCD
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic