Your solution would work...!!! but I would like to invoke save only one time, as I have many objects to be saved by this operation, like for eg: 100, 200, ... objects to be saved.
As I have replied to Chuck, if there is no solution then probably adding "sortOrder" or "datetime" field would solve this issue!!! ________________________________ From: "Chan Yeow Heong, Jerome" <[email protected]> To: Shravan Kumar. M <[email protected]> Sent: Sun, November 1, 2009 8:46:39 AM Subject: Re: how to insert records in database in the order of insertion to EC Do a save after each insert? Add in a date time field to help you sort? On 01-Nov-2009, at 9:57 AM, "Shravan Kumar. M" <[email protected]> wrote: Hi Group, > >Could any one please advise me how can I insert records in database in a >specific order or as per the order of insertion of objects to EditingContext >for eg: > >I have inserted objects to EC in the following order: A1, A2, A3, A4, A5 (and >then saved the EC once - editingContext.saveChanges()) >But, when these got saved to database the order is disturbed and is not >guaranteed i.e., I see following order sometimes: A2, A5, A1, A3, A4, whereas >I want the order of these objects as I have inserted to EC. > >I heard that we can do something with AdaptorOperations, but not sure of that >exactly and am trying to see if we have an higher level API for that. (Just a >note: We do not use Wonder > to the fullest, of course we use Wonder API's as required.) > >Thanks in advance, >Shravan Kumar. M >--------------------------- > > _______________________________________________ >Do not post admin requests to the list. They will be ignored. >Webobjects-dev mailing list ([email protected]) >Help/Unsubscribe/Update your Subscription: >http://lists.apple.com/mailman/options/webobjects-dev/eviltofu%40mac.com > >This email sent to [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
