Recommended RowVersion configuration for DB2

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
mstaessen
Posts: 1
Joined: Fri 17 Feb 2017 14:21

Recommended RowVersion configuration for DB2

Post by mstaessen » Fri 17 Feb 2017 14:34

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.

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

Re: Recommended RowVersion configuration for DB2

Post by Shalex » Mon 20 Feb 2017 15:53

Please try a workaround described at viewtopic.php?f=29&t=34672.

Post Reply