• 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: EOQualifier and ERXKey question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier and ERXKey question


  • Subject: Re: EOQualifier and ERXKey question
  • From: Travis Britt <email@hidden>
  • Date: Mon, 25 Apr 2011 17:46:37 -0400

Suggestion for making life suck less: can you store expirationDate as an attribute computed when the record is created/modified?

Then expired notifications = Notification.expirationDate.before(new NSTimestamp()), or the inverse. Otherwise you have to go subquery. Which you can do, but....

tb

WOWODC 2011 : July 1-2-3, Montreal. wowodc.com


On Apr 25, 2011, at 4:43 PM, Andrew Kinnie wrote:
Not sure if this is doable.  I have an entity (Notification) with an attribute for createDate and another for minutesToExpire which is an Integer and has a default, but can be changed.

I need to create a qualifier where I get all notifications where the createDate is after now - minutesToExpire

I have this for my qualifier, but it doesn't work because I am performing an operation on an ERXKey for the minutesToExpire attribute (I marked this with [???]).

ERXRestFetchSpecification<Notification> fetchSpec = new ERXRestFetchSpecification<Notification>(
Notification.CREATE_DATE.after(now.timestampByAddingGregorianUnits(0, 0, 0, 0, Notification.MINUTES_TO_EXPIRE [???] * -1, 0)), 
null, 
queryFilter(), 
Notification.MODIFY_DATE.descs(), 25);


 _______________________________________________
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

References: 
 >EOQualifier and ERXKey question (From: Andrew Kinnie <email@hidden>)

  • Prev by Date: EOQualifier and ERXKey question
  • Next by Date: Re: EOGlobalID
  • Previous by thread: EOQualifier and ERXKey question
  • Next by thread: AjaxUpdateContainer ?
  • Index(es):
    • Date
    • Thread