Sounds like you’re about to shoot yourself in the foot :) I really wouldn’t 
subclass here. If is_important can change, that’s a bad idea. It sounds like a 
mutable attribute.

You can set up a method on your article EO called importantPDFs() and use that 
as a propertyKey in your rules. Since it isn’t a real relationship, you’ll need 
to manually set up the things that are set automatically by D2W when 
EORelationship info is available. Stuff like componentName, 
keyWhenRelationship, etc.

To answer your question about why the result is duplicated… you’d need to 
fs.setIsDeep(false) [default true] or fs.setUsesDistinct(true) [default false] 
on your EOFetchspecification.

On Aug 18, 2014, at 12:07 PM, Theodore Petrosky <[email protected]> wrote:

> I have an Entity Article with a to-many to pdfs and to-one to thePDF.
> 
> I subclassed the Entity ‘PDF’ to ImportantPDF with a qualifier    isImportant 
> = 1   and I set up the relationship from Article to ImportantPDF.
> 
> it almost works. If I have an  Article with one uploaded pdf, and isImportant 
> is false, I see the asset listed in the pdfs List. however if I isImportant = 
> true (attribute of pdf) then the asset is listed on the isImportant list and 
> twice on the pdf list.
> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
> 
> 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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to