BUG: ORA-01400: cannot insert NULL into

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

BUG: ORA-01400: cannot insert NULL into

Post by hepek » Wed 03 Apr 2019 13:44

hi,

I have a table ASMBLY_MAIL_LIST_PREP that has field FLAG_MERGE_PURGE CHAR DEFAULT 'N' NOT NULL.
when I attempt to insert a new record in database I get this error:
ORA-01400: cannot insert NULL into ASMBLY_MAIL_LIST_PREP.FLAG_MERGE_PURGE
please note that I DO NOT SET this field anywhere in my code.

I checked the default value for the column in database and in devart diagram.
in database it is set to 'N', in devart it is set to "'N' " (note 10 spaces after 'N')


thank you.
Last edited by hepek on Fri 05 Apr 2019 13:23, edited 4 times in total.

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

BUG: ORA-01400: cannot insert NULL

Post by hepek » Wed 03 Apr 2019 15:55

please note I have experienced the same issue 6-7 years ago.
exactly the same issue: one version of devart was generating invalid default value for fields specified as CHAR(1) in database.

people do not report this bug because they probably set every flag in a code, and that works ok. so it does not happen very often. if you attempt to insert new row in database without setting the flag value - the default value will kick in and insert will fail.

thank you.
Last edited by hepek on Fri 05 Apr 2019 13:25, edited 4 times in total.

hepek
Posts: 126
Joined: Thu 07 Jul 2011 13:59

BUG: ORA-01400: cannot insert NULL into

Post by hepek » Fri 05 Apr 2019 13:11

this MUST be a bug.

the default value generated by devart is: DefaultValue="'N'space-tab-tab-tab-tab"
that is 'N' with space and 4 tabs. this does not look ok to me.

can you please at least acknowledge there is an issue and advise on how to fix it?

entity developer version - 6.3.555
dotConnect version (oracle): 9.6.570.0

thank you

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: BUG: ORA-01400: cannot insert NULL into

Post by Shalex » Tue 09 Apr 2019 19:41

hepek wrote: I have a table ASMBLY_MAIL_LIST_PREP that has field FLAG_MERGE_PURGE CHAR DEFAULT 'N' NOT NULL.
[...]
the default value generated by devart is: DefaultValue="'N'space-tab-tab-tab-tab"
that is 'N' with space and 4 tabs. this does not look ok to me.
With dotConnect for Oracle v9.6.725 and VS2017 and Devart Entity Model (EF6, DbContext template, XML mapping), the *.edml model includes the following entries after importing the field FLAG_MERGE_PURGE CHAR DEFAULT 'N' NOT NULL:
SSDL -> devart:DefaultValue="'N'" DefaultValue="N"
CSDL -> DefaultValue="'N'"
with no spaces and no tabs.

Please upgrade to v9.6.725 and send us a small test project for reproducing.

Post Reply