• 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
Re: subclassing an Entity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subclassing an Entity


  • Subject: Re: subclassing an Entity
  • From: Ramsey Gurley <email@hidden>
  • Date: Mon, 18 Aug 2014 13:17:44 -0700

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@hidden> 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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: subclassing an Entity
      • From: Chuck Hill <email@hidden>
References: 
 >subclassing an Entity (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: subclassing an Entity
  • Next by Date: Re: subclassing an Entity
  • Previous by thread: subclassing an Entity
  • Next by thread: Re: subclassing an Entity
  • Index(es):
    • Date
    • Thread