0

This may sound crazy, but I have not been able to find an example in the literature on how to build a qualifier to fetch a master/detail relationship using EOF.

I could do it in SQL with my eyes closed. Now, I know I am not supposed to use primary or foreign keys, so what is the EOF solution? How do you build such a qualifier for a fetch?

Thanks in advanced for your answers.

Guichito
  • 127
  • 1
  • 6
  • Just to clarify, I am trying to retrieve an entry in a particular invoice. Like: "3 screwdrivers for $5 each Total $15" in invoice 32012 – Guichito Oct 09 '15 at 08:35
  • Back to the questions, Are you using Wonder? How is the database normalized? What's the schema like? You have supplied no information with what you have tried so there is no point of reference. Which example are you using as the basis? – Theodore Petrosky Oct 09 '15 at 10:44

2 Answers2

0

That depends on what you are trying to do. Do you have and are you using Wonder? Do you have access to the Webobjects Books? There are a few. The newest is the Markus Ruggiero "Learning the Wonders"! it's available in an electronic version as well.

I am not trying to be vague but if you have a displayGroup of objects, you just pass an object and ask for the details.

WO will create the SQL, ask the backend and pass you a dictionary with the details. It really is that easy.

0

If you need to set up fetch strategy, then have a look at http://webobjects.mdimension.com/javadoc/WebObjects/5.4/com/webobjects/eocontrol/EOFetchSpecification.html#prefetchingRelationshipKeyPaths()

If you taking about "where" clause, then you should you qualifier.

Nick V
  • 1,591
  • 1
  • 11
  • 7