Subject | Re: [firebird-support] Generator and Trigger confusion ? |
---|---|
Author | Milan Babuskov |
Post date | 2003-11-11T18:35:06Z |
Woody (TMW) wrote:
use triggers.
In fact, the trigger approach isn't good for master-detail stuff at all.
If you use triggers and insert master record, there is no way of finding
out what is the PK value of master record, since generators are out of
transaction control and some other user may increase it while your
transaction is still running.
--
Milan Babuskov
http://fbexport.sourceforge.net
> I get/assign the generator values from the client as well. The main reasonI do the same for master-detail relationships, but for simple tables I
> is that you have immediate access to the value for use in creating child
> records, etc. If the value is assigned at the server, you have to re-query
> in order to obtain the value.
use triggers.
In fact, the trigger approach isn't good for master-detail stuff at all.
If you use triggers and insert master record, there is no way of finding
out what is the PK value of master record, since generators are out of
transaction control and some other user may increase it while your
transaction is still running.
--
Milan Babuskov
http://fbexport.sourceforge.net