Retrieving column values set by a trigger
Posted: Mon 15 Sep 2008 19:27
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!
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!