DmlOptions.InsertNullBehaviour.Omit - Bug

DmlOptions.InsertNullBehaviour.Omit - Bug

Postby Species8372 » Mon 20 Feb 2012 15:36


i am using the current Version 6.70.

When using the following setting:

OracleEntityProviderConfig.Instance.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.Omit;

it is not possible to insert an empty Entity, e.g.

MYEntity e = new MYEntity();
context.SaveChanges(); <- Error at this point

MYEntity is completely empty, i want to have an empty row in my database with null-values only (except the primary key).

I guess the insert does something like "Insert into myentity () values()" ?!


Posts: 5
Joined: Wed 06 Apr 2011 13:45

Postby Shalex » Tue 21 Feb 2012 15:53

As we understood, the value for the primary key column is generated in your database (sequence + trigger). If so, set StoreGeneratedPattern=Identity for your primary column in the store part of the model.

If not, please specify the following information:
- the exact text of the error
- turn on the dbMonitor tool and check the actual query
Download link:
Documentation: ... nitor.html

Refer to try specifying devart:DefaultValue="MY_SEQUENCE.NEXTVAL" (if there is a corresponding sequence for your primary key in the database) and using InsertNullBehaviour.InsertDefaultOrOmit.
Devart Team
Posts: 7344
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for Oracle