Take a look at ERXToManyQualifier.

Should be something like

EOQualifier q = new ERXToManyQualifier(Book.AUTHORS.key(),new NSArray<Author>(author),0);

or using ERXQ

EOQualifier q = ERXQ.has(Book.AUTHORS.key(),new NSArray<Author>(author));



NSArray<Book> matchingBooksSortedByName = Book.fetchBooks(ec,q,Book.NAME.ascs());

Timo



Am 03.12.2009 um 12:25 schrieb Riccardo De Menna:

Ok ok... I suck at writing examples as I incorrectly explained myself.

The relationship is a toMany so... rewording my request:

I want all the records from the 'Book' entity that have an 'authors' relationship that CONTAINS a specific record coming form the 'Author' entity.

rdm


On 03/dic/2009, at 12.10, Stefan Klein wrote:

Hi,

new EOKeyValueQualifier(_Book.AUTHOR, EOQualifier.QualifierOperatorEqual, author)

EOF is doing the rest

Stefan

Riccardo De Menna schrieb:
Hi,

How do I build a fetch specification that qualifies objects based on the content of relationship and not an attribute?

In other words let's say I want all the records from the 'Book' entity that have an 'author' relationship to a specific record in the 'Author' entity.

Riccardo De Menna

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/stefan.klein%40buero-sde.de

This email sent to [email protected]



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/th-dev%40onlinehome.de

This email sent to [email protected]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to