You can change your triggers to:
CREATE TRIGGER STUDENTS_BI FOR STUDENTS
ACTIVE BEFORE INSERT POSITION 0
as
begin
if (COALESCE(new.id, 0) < 1) then
new.id = gen_id(gen_students_id, 1);
end
--------------------------------------------------
From: "Stan" <[email protected]>
Sent: Thursday, December 30, 2010 5:24 AM
To: <[email protected]>
Subject: Re: [Firebird-net-provider] Entity Framework autoincrement problem
>
> It seems that the firebird server performs
> insert into students(id, firstname) values(0, 'asdf')
> instead of
> insert into students(firstname) values('asdf')
> select id ...
> --
> View this message in context:
> http://firebird.1100200.n4.nabble.com/Entity-Framework-autoincrement-problem-tp3167085p3167993.html
> Sent from the firebird-net-provider mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Firebird-net-provider mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider