Do I think this is something that ought to go into EOF proper? Not really. But the original poster was looking for a way to automatically fix his PK sequences and so I'm giving him the outline of how he could do this. He may decide (and I would if I were him) that ultimately it's cheaper to remind yourself to update the PK sequence if you make changes outside of EOF.

He can simply add a trigger on insert. So could EOF, btw...
Yeah, I was thinking about this, too, but I wonder if performance would suck ... For non-EOF inserts, it wouldn't be any worse than an EOF insert, but for an EOF insert you'd hit it twice -- once to get the PK originally, and a second time by the insert trigger. I suppose you only really take a very small hit against the pk table, which is tiny, and you only have to even update it if the table pk > eo_pk_table's value, so most of the time you'd only get one extra select and not an update. Given that this could save you from a world of annoying out-of-syncness, it might actually be worth it for a mysql person to try to write. Is MySQL the only db that has to use eo_pk_table?

ms

_______________________________________________
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