On Mon, 2006-12-11 at 22:24 +0300, Oleg Broytmann wrote: > On Mon, Dec 11, 2006 at 02:17:20PM -0500, David Turner wrote: > > 1. Wait to create the row in base until just before the row in derived > > is to be created. > > > > 2. (maybe) use transactions. > > We cannot wait because we need an id from the parent table to insert a > new row to the child table with the same id. Transactions are the only > answer, I think.
There's a bit of a tricky thing about transactions: we need to make sure that the calculation of default values for the derived row takes place outside (but simultaneous with) the transaction, because anything inside the transaction can see the new row in the base table. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
