aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Entity beans relationships question in the HFE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Entity beans relationships question in the HFE" Watch "Entity beans relationships question in the HFE" New topic
Author

Entity beans relationships question in the HFE

Adri Smith
Ranch Hand

Joined: Jun 07, 2004
Posts: 76
From the HFE book, p432 q4:

Given the container-managed unidirectional relationship:

Foo(0-1) -> Bar(0-1)

and the object relations:

f1->b1
f2->b2

What will be true after the following code runs?

f2.setBar(f1.getBar())

How is it possible that 'b2.getFoo()==null' is one of the correct answers ? If the relationship is unidirectionnal this means we can call the method getBar() on the Foo beans but not the method getFoo() on the Bar Beans.

I took a look at the errata, nothing has been specified about this.

Thanks in advance for your help,
Adri
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity beans relationships question in the HFE