This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, How should I implement unidirectional relationship? Let's say I have this kind of relationship (btw from page 432): Foo (0-1) -> Bar (0-1) Do I have to have CMR fields in both Foo and Bar? If so then what does "unidirectional relationship" means in terms of implementation? Or maybe the only difference is I do not put Foo accessor methods into Bar class remote(or local) interface(s). In that case... does it makes any difference is it unidirectional or bidirectional to container? My best regards
Hi, Vladas, Let's look at relationship Customer-HomeAddress. Customer must know his/her address, but Address does not need to know anything about it's customer. Here is the piece of DD for this relationship:
It was taken from SCBCD Study Guide web-site. As you can see, Address definition does not have cmr-field element. This means, Address have no idea about customer (the relation is unidirectional) This and much-much more you can find there Cheers!!!
Thanks ! And likewise if I don't have CMR field it means I do NOT put abstract setter/getter for it Nice site Mikalai! Now I see that bean with only remote interface may only have unidirectional relationship from one side. My best regards
Joined: Jun 04, 2002
Now I see that bean with only remote interface may only have unidirectional relationship from one side.
yeah, you are absolutely right, bean with only Remote interface can have [unidirectional] relationship to other bean (with local interface), but nobody can access it in CMR.