Dawn,

I second this, whole heartedly. Don't put business meaning on the keys (primary or foreign) of a database table. They are an artifact of the database. You are only asking for trouble in the future when someone says that they want to change the order, or some other horrific thing that customers ask for.

Dave


On Jan 12, 2009, at 3:50 PM, Andrew Lindesay wrote:

Hello Dawn;

If you are using the keys as a reliable sequence, it may be better to instead keep a separate ordering attribute rather than use the generated keys.

cheers.

I am creating new EO objects and I need them to be saved to the DB in the same order that they were created so their primary keys will be in the order created. It seems like when I call saveChanges on the editing context that
the records are just being saved to the DB all willy nilly.

It looks like the only way to enforce this is to do multiple calls to
saveChanges which I'd like to avoid.

Is there some way to have it save a group of objects in the order created?

___
Andrew Lindesay
www.lindesay.co.nz

_______________________________________________
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/webobjects%40avendasora.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]

Reply via email to