d95pari wrote:
The id part in the mapping XML-file look like this:
<id name="SignId" column="signid" type="int" unsaved-value="0">
<generator class="sequence">
<param name="sequence">signid_generator</param>
</generator>
</id>
And the generator declaration in the database' table is:
ACTIVE BEFORE INSERT POSITION 0
as
begin
new.SignId = gen_id(signid_generator, 1);
end
Does anyone know what is wrong?
The trigger, it should look like (psedocode, do not know the firbird syntax):
ACTIVE BEFORE INSERT POSITION 0
as
begin
if new.SignId IS NULL then
new.SignId = gen_id(signid_generator, 1);
end