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 snip This routine only copies the amount

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 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