NUMBER column mapped to long -> insert does not work

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dcoracle600pro
Posts: 45
Joined: Mon 09 Apr 2012 09:57

NUMBER column mapped to long -> insert does not work

Post by dcoracle600pro » Fri 07 Oct 2016 07:52

Hi,

I have a table with the pk column as NUMBER (no precision). I know that this column will not contains decimal values. So in my POCO EF class, in declare a property of type long.

When I try to create and save a new object, the SQL query generated ommit this column (-> error ORA-01400) ! If I change the type from long to Decimal, it works fine.

Is this behaviour normal ?

I use version 8.5.558

Thank you

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

Re: NUMBER column mapped to long -> insert does not work

Post by Shalex » Fri 07 Oct 2016 15:22

Try setting Store Generated Pattern=None for your PK property explicitly. If this doesn't help, send us a small test project for reproducing the issue in our environment.

dcoracle600pro
Posts: 45
Joined: Mon 09 Apr 2012 09:57

Re: NUMBER column mapped to long -> insert does not work

Post by dcoracle600pro » Tue 11 Oct 2016 05:44

Thank you, it works !

Post Reply