Building a qualifier to fetch a master/detail relationship in Enterprise Objects

75 views Asked by At

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.

2

There are 2 answers

0
Nick V On BEST ANSWER

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.

2
Theodore Petrosky On

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.