ServiceStack Ormlite and RowVersion support

What's the easiest way to maintain sqr server rowversion during upgrade?

I've tried this:

db.UpdateOnly(u, f => new { f.Name, f.Description, f.Modified, f.ModifiedBy }, f => f.Version == u.Version && f.Id == u.Id);

      

but this fails because it compares the version like Varchar(8000)

, go figure.

Not exactly the same, but still the ServiceStack and OrmLite question:

What's the best way to find descriptions of download related objects? I've seen this but noticed that a changeset is being checked Join

? This has resulted in POCO classes now having additional "Ignored" declarations for each of the foreign keys.

+3


source to share


1 answer


Since the RowVersion is a field byte[]

, it requires parameterized Updates / Insert support, which was added to ServiceStack.OrmLite in v.3.9.37 .



The support Join

is different from the new expression builder we are planning to add to OrmLite, but not ready yet. For eager loading you can use custom SQL, or depending on your query, you can concatenate the result sets in memory using Linq2Objects .

+4


source







All Articles