Subject | Re: [firebird-support] Generator and Trigger confusion ? |
---|---|
Author | Artur Anjos |
Post date | 2003-11-11T17:57:45Z |
Fred,
It's quite easy to define a PK value in the client, post the data, and
'refresh' the values from the server using the primary key to identify the
row. A trigger will guarantee that a PK get's the value if the client
doesn't provide it.
We don't care about any 'jumps' in values, we use just one generator to all
tables. I have lot's of this 'jumps', but since the generator works outside
the transaction, I just get a unique identifier of the row. I really don't
care about a generator value - it could be positive, negative, as long as it
really is unique. And it always is.
Artur
>>We *never* allow an application (user) to supply the PK value.I do it all the time. :-)
It's quite easy to define a PK value in the client, post the data, and
'refresh' the values from the server using the primary key to identify the
row. A trigger will guarantee that a PK get's the value if the client
doesn't provide it.
We don't care about any 'jumps' in values, we use just one generator to all
tables. I have lot's of this 'jumps', but since the generator works outside
the transaction, I just get a unique identifier of the row. I really don't
care about a generator value - it could be positive, negative, as long as it
really is unique. And it always is.
Artur