Re: how to insert records in database in the order of insertion to EC
Re: how to insert records in database in the order of insertion to EC
- Subject: Re: how to insert records in database in the order of insertion to EC
- From: "Shravan Kumar. M" <email@hidden>
- Date: Sat, 31 Oct 2009 20:51:43 -0700 (PDT)
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@hidden>
To: Shravan Kumar. M <email@hidden>
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@hidden> 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
---------------------------
href="mailto:email@hidden">email@hidden
_______________________________________________
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