• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q re on-to-one Relationships

 
Matthew Shalorne
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic