I'm testing dotConnect for Oracle and Entity Developer, both trial versions.
I want to let the database generate the entity's id based on a sequence nextval.
I'm currently following the steps described at http://blog.devart.com/set-identity-and ... ggers.html, but whenever I set the attribute's default value in Entity Developer to S_USER.NEXT_VAL I get an error like "Default value (S_USER.NEXTVAL) is not valid. Expected an integer between -9223372036854775808 and 9223372036854775807."
The procedures described at this link are out to date?
What I'm doing wrong?
Any help would be awesome
Thank you
EF Generate Primary Key from Sequence
Re: EF Generate Primary Key from Sequence
Looks like you defined the Default Value property in CSDL. But you should set it in the SSDL part of the model instead. For this, navigate to Tools > Entity Developer > Model Explorer > *.Store > Tables/Views > select the needed StorageColumn and naviagate to its Default Value property. Save the model and check the generated SQL via dbMonitor.
-
- Posts: 7
- Joined: Fri 22 Aug 2014 19:07
Re: EF Generate Primary Key from Sequence
Thank you very much Shalex, it worked.