• 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: More Readable EOQualifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More Readable EOQualifiers


  • Subject: Re: More Readable EOQualifiers
  • From: John Huss <email@hidden>
  • Date: Fri, 13 May 2011 13:49:31 -0500

On Fri, May 13, 2011 at 1:38 PM, David Avendasora <email@hidden> wrote:
My new strategy combines still doing some setup, but the setup is explicitly for making things easier to read.

EOQualifier haveRedHair = Student.HAIR_COLOR.eq(MyAppConstants.RED_HAIR);
EOQualifier areActive = Student.IS_ACTIVE.isTrue();
NSArray redheadedStudents = mySchool().students(Student.that(haveRedHair).and(areActive));
The thing is, the code only reads like english IF you save the qualifier to a temporary variable AND name it appropriately; that's too loose of a constraint.  So I would agree with Ramsey that the shorter, non-english version is sufficient.  I'm not opposed to adding it, but I probably wouldn't use it.

As for generating them in the templates I don't think it's worth it.  I would take less time to declare a constant with the qualifier than to add it to the model somehow.

John
 _______________________________________________
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: More Readable EOQualifiers
      • From: David Avendasora <email@hidden>
References: 
 >More Readable EOQualifiers (From: David Avendasora <email@hidden>)
 >Re: More Readable EOQualifiers (From: Chuck Hill <email@hidden>)
 >Re: More Readable EOQualifiers (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: More Readable EOQualifiers
  • Next by Date: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship
  • Previous by thread: Re: More Readable EOQualifiers
  • Next by thread: Re: More Readable EOQualifiers
  • Index(es):
    • Date
    • Thread