Auto Increment column support (LinqConnect+Oracle)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
kautuk
Posts: 4
Joined: Mon 26 Apr 2010 11:02

Auto Increment column support (LinqConnect+Oracle)

Post by kautuk » Wed 28 Jul 2010 05:04

Auto increment primary key columns are not supported in LinqConnect with [isDbGenerated=true] attribute when used with Oracle.

kautuk
Posts: 4
Joined: Mon 26 Apr 2010 11:02

Auto Increment column support (LinqConnect+Oracle)

Post by kautuk » Wed 28 Jul 2010 05:13

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.??

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 29 Jul 2010 14:49

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.

Post Reply