Hi
I have a question regarding the use of the Oracle ORA_ROWSCN virtual column and the MSSQL rowversion column type.
What we have is a series of POCOs generated using the Entity Developer template, and then we have two separate dbcontext implementations that bascially takes care of dealing with the differences between Oracle and MSSQL.
Now in the POCOs (model) we have a column/field called something like "ConcurrenyField", in the fluent mapping of both context we mark these columns as the concurrency field (concurrencytoken and computed).
In the sql context that is all we need, in the oracle context we also override the columname to be "ORA_ROWSCN".
Here is the problem: the ORA_ROWSCN is mapped to a decimal (or an Int64) byt the dotConnect for Oracle provider (i assume) while the MSSQL Rowversion type is mapped to a byte[] array by the sqlclient provider. Is there any way to force the ORA_ROWSCN to also map to a byte[] array, or the other way around force the rowvversion be mapped as an int/decimal?
We have some sort of workaround where we defined two properties on the POCO one for Oracle and one for MSSQL, but that is rather ugly.
And before anyone suggests triggers, I know that is a viable working solution but I would rather just use the built-in features of the DBMS since that requires less maintenance on our part.
ORA_ROWSCN and Rowversion using fluentmapping and POCO
Generally in Oracle, concurrency checks cannot be made by the ORA_ROWSCN pseudo-column, since the values of these pseudo-columns are changed only after the transaction is saved (http://www.infoq.com/articles/multiple-databases).