• 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
EOModeling qualified one to many
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOModeling qualified one to many


  • Subject: EOModeling qualified one to many
  • From: james cicenia <email@hidden>
  • Date: Mon, 12 Jan 2004 20:01:32 -0600

Well that is very close to what I have been asking...

What does the third pane in the inspector due for relationships? Could
one use those key value combinations to create these qualified relationships?


-James

On Jan 12, 2004, at 7:02 PM, email@hidden wrote:

To: WOdev List List <email@hidden>

Hola Ray!

One posibility (not very efficient, but ease to implement) is the
following; suppose we have a master-->>detail relation and, once
selected a masterObject, we want only those details related to master
which ALSO have the atribute toFilter>0.

So, by default, the detailDisplayGroup will fetch all details with FK =
masterObject.PK but if we set a qulifier to such a displayGroup we can
get the filtered array with displayedObjects() (instead of
allObjects()):

detailDisplayGroup.setQualifier(new
    EOQualifier.qualifierWithQualifierFormat("toFilter>0",null));
filteredArray = detailDisplayGroup.displayedObjects();

Observe that it is different from

displayGroup.dataSource().setQualifier...
array = displayGroup.allObjects();

The problem is that, eventhough the displayGroup is qualified, it will
retrive ALL related objects from the db and show/display ONLY those
that match the qualifier; so, if the displayGroup's qualifier is realy
restrictive, there can be a time/resources-consumming isue.

When you find a better approach, please let us know.

Yours,
Dino
_______________________________________________
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.

  • Follow-Ups:
    • Re: EOModeling qualified one to many
      • From: Ricardo Strausz <email@hidden>
  • Prev by Date: Re: Limiting number of assignments in a many-to-many relationship
  • Next by Date: WO or PHP?
  • Previous by thread: Re: Filtering an array of EO objects in D2J (getting the data source)
  • Next by thread: Re: EOModeling qualified one to many
  • Index(es):
    • Date
    • Thread