• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: An EnterpriseObject Design Question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An EnterpriseObject Design Question...


  • Subject: Re: An EnterpriseObject Design Question...
  • From: Ken Anderson <email@hidden>
  • Date: Mon, 26 Dec 2005 16:19:53 -0500

Kieran,

There's no way to do this directly in EOModeler, but you can certainly do it yourself. I often create EORelationships when necessary based on runtime information.

It would really help if you could provide a concrete example - maybe there's some way to work inheritance into this?

Ken

On Dec 26, 2005, at 2:58 PM, Kieran Kelleher wrote:

Java interfaces allow us to implement flexible relationships between objects or just plain flexibility using composition, but I am kinda confused as to the best way to implement such relationships/composition in my EOModel.

For example, let's say I have Entity A, B and C and each implements the X interface. Now let's say I have entity G which by composition has a to-one relationship with an object that implements the X interface. How would I model that?

Would it require something custom like having two attributes in entity G, namely 'typeXRelatedEntityName' and 'typeXRelatedEntityOid' and then giving G custom attribute getter/ setter [ x(), setX( X anObject) ] that retrieves the related entity by fetching the single entity using the two attributes? Is there anyone using a pattern like this or a better one for persistent relationships to various objects that implement an interface? Any gotchas/pitfalls?

Regards and thanks, Kieran

PS. I don't want to use inheritance since A, B and C are quite different and I want the flexibility to add other entities that implement interface X in the future.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >An EnterpriseObject Design Question... (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: An EnterpriseObject Design Question...
  • Next by Date: Direct to Java Client and frameworks (reposted)
  • Previous by thread: An EnterpriseObject Design Question...
  • Next by thread: Re: An EnterpriseObject Design Question...
  • Index(es):
    • Date
    • Thread