Page 1 of 1

Auto Increment column support (LinqConnect+Oracle)

Posted: Wed 28 Jul 2010 05:04
by kautuk
Auto increment primary key columns are not supported in LinqConnect with [isDbGenerated=true] attribute when used with Oracle.

Auto Increment column support (LinqConnect+Oracle)

Posted: Wed 28 Jul 2010 05:13
by kautuk
Recently we have moved our database from MySql to Oracle.
We are now using LinqConnect 1.00.
But table columns which were auto incremental before are not throwing exception that "cannot insert NULL value."

we checked the designer.cs of our datacontext. those columns have the required attributes [IsDbGenerated=true] and [AutoSync=OnInsert]

But still error exists.

Any Help.??

Posted: Thu 29 Jul 2010 14:49
by AndreyR
It should be enough to add a BEFORE INSERT trigger on the database side and to set the Auto Generated Value property to True and the AutoSync property to OnInsert for the autoincrement column in the model.