Page 1 of 1

How to verify at runtime the property StoreGenerated==Idenfity of a database field

Posted: Tue 06 May 2014 12:12
by Mattm
Hello,

I am using Entity Framework 5 with VS.NET 2012 (C#) and created a database model from a oracle database. In a table there exists a field that is filled on commit via PL/SQL Script. Therefore I set the "Store Generated" property of this field to "Identity" to be able to access this generated value in my code.

I've done this in the Model Explorer at two places:
1) DomainModel.XXX/Classes/<Table Name>/<Field Name> -> Properties
2) DomainModel.XXX.Store/"Tables/Views"/<Table Name>/<Field Name> -> Properites

Due to model regeneration issues I need to verify at runtime, if these both properties are set for certain database fields.

So my question is how it's possible to verify the above-mentioned "Store Generated==Identify" properties of a database field at runtime?

Thanks!

Re: How to verify at runtime the property StoreGenerated==Idenfity of a database field

Posted: Thu 08 May 2014 16:55
by Shalex
Please run the dbMonitor tool to enable tracing of the database activity and check the generated SQL:
http://www.devart.com/dotconnect/oracle ... nitor.html
http://www.devart.com/dbmonitor/dbmon3.exe

The "Store Generated==Identify" storage column should be excluded from the INSERT statement but returned with the RETURNING clause.