Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-30 Thread Stan
I read that article before but the thing that the property Identity is disappering makes me think that I have another problem (I didn't have it disappeared). Now I noticed that the comment in the column on the database side causes the StoreGeneratedPattern property in the SSDL content section of

Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-30 Thread Jiri Cincura
On Thu, Dec 30, 2010 at 07:45, Stan wrote: > And the trigger fires in case with an sql query, but doesn't using Entity > Framework in Visual Studio. > Maybe I have to make this autoincrement implementation in some different > way? > Does that sql code look ok? Did you marked the field as Identity

Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-30 Thread Stan
Yes I can do that thing but I want to return a currently generated id in order to use it in my entity class, and it is still 0. I mean the schema "insert - select" seems not working in my code using firebird database. In case with mssql it returns the proper value, so maybe I have to do something

Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-30 Thread Roberto Carlos | Unimed
, December 30, 2010 5:24 AM To: 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&

Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-29 Thread Stan
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

Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-29 Thread Stan
That's what I have in the database: CREATE GENERATOR GEN_STUDENTS_ID; CREATE TABLE STUDENTS ( ID INTEGER NOT NULL, FIRSTNAME VARCHAR(50) ); ALTER TABLE STUDENTS ADD CONSTRAINT PK_STUDENTS PRIMARY KEY (ID); CREATE TRIGGER STUDENTS_BI FOR STUDENTS ACTIVE BEFORE INSERT POSITION 0

Re: [Firebird-net-provider] Entity Framework autoincrement problem

2010-12-29 Thread Jiri Cincura
On Wed, Dec 29, 2010 at 13:59, Stan wrote: > After context.SaveChanges() has performed I'm getting the id = 0 in my > database table > and the generator doesn't change its value. The second call raise an > exception, because > I'm trying to insert id as 0 and it is already stored in the database.

[Firebird-net-provider] Entity Framework autoincrement problem

2010-12-29 Thread Stan
Hi, I have a problem with Identity store generation pattern. It seems doesn't work or maybe I'm doing something wrong. I've made the table "students" and the fields "id" and "name" as the key field as well as the generator. The simple insert sql statement - "insert into students(name) values('so