Hello,
I am using OraDirect.NET with the Entity Framework. Many of our tables have identity columns, the values of which are set by triggers which use sequences. We need to be able to retrieve the values of these columns after calling SaveChanges().
In SQL Server, we would simply set the table's identity column, which would be automatically updated in the entity after calling SaveChanges(). However, Oracle doesn't have an equivalent.
If there was a way to get the sequences NEXTVAL and supply this to the table, that would be another way to approach the problem. However, it appears that the Entity Framework does not support sequences, so this approach is not an option.
Thanks in advance for any help!
Retrieving column values set by a trigger
If the column value is only set during insertion, you could add manually StoreGeneratedPattern="Identity" to the column defintion in the storage schema.
If the column value is set during insertion and update, you could add manually StoreGeneratedPattern="Computed" to the column defintion in the storage schema.
This works fine with me.
If the column value is set during insertion and update, you could add manually StoreGeneratedPattern="Computed" to the column defintion in the storage schema.
This works fine with me.