Page 1 of 1

Recommended RowVersion configuration for DB2

Posted: Fri 17 Feb 2017 14:34
by mstaessen
What is the recommended way to create a RowVersion Column using EF and dotConnect for DB2?

I am migrating a Sql Server model to DB2. In SqlServer, you just create a byte array property and annotate it with the TimestampAttribute.

When I try to create a migration using dotConnect for DB2, the creation fails with the message "Sequence contains no matching element". (Not a very useful exception message by the way). If I change the property type to DateTime, I get an error that RowVersion properties should have a byte array data type.

Can I even use the TimestampAttribute on DB2?

I could use the ConcurrencyCheckAttribute on a LastModificationDate property, but that's more of a workaround than a permanent solution.

Re: Recommended RowVersion configuration for DB2

Posted: Mon 20 Feb 2017 15:53
by Shalex
Please try a workaround described at viewtopic.php?f=29&t=34672.