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

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Mattm
Posts: 1
Joined: Tue 06 May 2014 11:44

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

Post by Mattm » Tue 06 May 2014 12:12

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!

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

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

Post by Shalex » Thu 08 May 2014 16:55

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.

Post Reply