• 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: Relationship between 2 models
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relationship between 2 models


  • Subject: Re: Relationship between 2 models
  • From: Art Isbell <email@hidden>
  • Date: Tue, 7 Oct 2003 12:22:24 -1000

On Tuesday, October 7, 2003, at 11:21  AM, Arturo Pirez wrote:


On Tuesday, October 7, 2003, at 04:46 PM, Art Isbell wrote:

Avoid anything that would create an SQL join between tables in each DB. E.g., no flattened attributes or relationships across models, no fetch specs that involve attributes from both models, etc. You'll need to do the joins locally in your app. Otherwise, it's doable.

I thought one of the features was letting you do pseudo-joins like the above? What happens when you
do cross-model relationship?

You can model a relationship across eomodels even if the eomodels model different DB's. You can fetch objects from the source entity which will create relationship faults. When these faults fire, objects from the destination entity will be fetched. This should work fine even if the source and destination entities model tables in different DB's. But I don't think you can prefetch a cross-eomodel relationship because that involves a join across tables in different DB's. Someone correct me if I'm wrong.


You can't do anything in your eomodel that would generate SQL that joins tables in different DB's like flattening an attribute across a cross-eomodel relationship or flattening a cross-eomodel relationship. And you can't define a fetch spec in an eomodel or write one in code that involves attributes in different entities that model tables in different DB's or key paths that include a cross-eomodel relationship.

It's unfortunate that one must be aware of these limitations, but I'm not sure that EOF could detect this and do the right thing automatically in all cases.

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Relationship between 2 models (From: Arturo PĂ©rez <email@hidden>)

  • Prev by Date: mac browser to launch program on client's computer
  • Next by Date: directory to create the JSP file in
  • Previous by thread: Re: Relationship between 2 models
  • Next by thread: Re: Relationship between 2 models
  • Index(es):
    • Date
    • Thread