Page 1 of 1

StoreGeneratedPattern="Identity"

Posted: Fri 12 Nov 2010 09:38
by Dominik
Hi,

In my edml model, If I declare an entity field as Store Generated Pattern=Identity, this is translated to my CDSL content as an attribute annotation:StoreGeneratedPattern="Identity" in field property.

Then, if I try to create a new entity to my Oracle database, I get this error:

System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> Devart.Data.Oracle.OracleException: ORA-00001: unique constraint violated.

If I add manually the attribute StoreGeneratedPattern="Identity" to my SSDL content as an attribute of the field property as in my EDMX model for SQL Server, then it works without any problem.

Was that a bug in edml model?

Thanks in advance,

Dominik.

Posted: Fri 12 Nov 2010 10:06
by AndreyR
No, this is not a .edml bug. If you declare a conceptual attribute, it does not influence the storage part of the model.
In a .edml model you can edit the Storage model in design time (go to the Model.Store node in the Model Explorer Entity Developer window).
This is a more convenient way than editing XML (that was discussed for the .edmx models in this thread).