Bug in concurrency control wrap-around
Brought to you by:
mnmr
Version 1.0.2
The concurrency control value in any object will
wrap-around before the database column does.
I found the bug in file PersistenceBroker.cs, line 487:
long version = 1 + Convert.ToInt64( fm.GetValue( obj ) );
// handle wrap-around of the version counter
if( (fm.Type.Equals( typeof(int) ) && version ==
int.MaxValue) || (fm.Type.Equals( typeof(long) ) &&
version == long.MaxValue) )
version = 1;
The following lines will fix that bug:
long version = Convert.ToInt64( fm.GetValue( obj ) );
// handle wrap-around of the version counter
if( (fm.Type.Equals( typeof(int) ) && version ==
int.MaxValue) || (fm.Type.Equals( typeof(long) ) &&
version == long.MaxValue) )
version = 1;
else
version += 1;
Logged In: YES
user_id=974288
Thanks!
This fix has been applied in Subversion and will be in 1.0.3.