Subject Re: [firebird-support] Generator and Trigger confusion ?
Author Milan Babuskov
Woody (TMW) wrote:
> I get/assign the generator values from the client as well. The main reason
> 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.

I do the same for master-detail relationships, but for simple tables I
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