Re: Trying to calculate a running total using Core Data

2008-04-21 Thread I. Savant
> ... of course, even if you use a predicate to specify a date range, > the transaction order still doesn't matter. I digress. Sorry - this is confusing. I meant to delete this paragraph after I realized that the OP is talking about a running balance after each transaction, rather than the to

Re: Trying to calculate a running total using Core Data

2008-04-21 Thread I. Savant
> First issue I see is how you can know what transaction objects "occur" prior > to any given object. I don't think you can rely on objects being retrieved > in any specific order that your data model doesn't enforce. You're correct - you can't rely on the order in which instances are fetched

Re: Trying to calculate a running total using Core Data

2008-04-21 Thread Keary Suska
on 4/21/08 2:06 AM, [EMAIL PROTECTED] purportedly said: > I am trying to figure out how to calculate a running total using core > data. I have created an entity called Transactions that have the > following properties. > > Transactions > amount > balance > > > > This routine only copies the am

Re: Trying to calculate a running total using Core Data

2008-04-21 Thread I. Savant
I know how to create a NSFetchRequest on a transaction object but I am unsure on how to create the NSPredicate object to extract all the transactions that were created prior to the current transaction. How about consulting the documentation? Fetching (trust me - re-read this) http://devel