[odb-users] MS SQL rowversion
boris at codesynthesis.com
Mon Jan 14 09:37:55 EST 2013
In the future please keep your replies CC'ed to the odb-users mailing
list as discussed in the posting guidelines:
Chew kk <chew.on.it at gmail.com> writes:
> Yes. I'm serious about adopting ODB as I do not have a better alternative,
> though I could go with QxOrm. However, QxOrm doesn't have a comprehensive
> user guide. It is great to hear that ODB is supporting rowversion.
It doesn't support it now but it will in the next release. In fact, I
just finished adding this support. If you would like to try it before
the final release (always a good idea), I can package you a pre-release.
> On the point of MSSQL not necessarily incrementing the rowversion
> sequentially, would that have any conflict on ODB's optimistic
No, I've added a test and everything works fine.
> Just a clarification. With the rowversion added, I'll be able to do
> something like the following. Is that right?
> #pragma db object optimistic
> class person
> #pragma db version type("ROWVERSION")
> unsigned long version_;
Yes, except that you will need to use unsigned long long (ROWVERSION
is a 64-bit value).
> I've another question concerning transaction. ODB didn't explicitly
> indicate the isolation level. Is it using read committed by default? Is
> there a way to set isolation level?
Yes, the default is the SQL Server default (READ COMMITTED). While there
is a way to set a custom isolation level now, it is not very convenient.
I will add an argument to the odb::mssql::database constructors that will
allow to specify an alternative value.
More information about the odb-users