xain
xain

Reputation: 13839

"version" lock value for populating tables

I need to populate a couple of tables from a db that was created when the grails app was run. I kept the "version" column for hibernate's locking strategy, so I need to know what value is safe to put in that field when importing the data to those tables.

Upvotes: 0

Views: 242

Answers (2)

Rick
Rick

Reputation: 41

If you're going to be modifying existing records while your application is running be sure to increment the value of 'version'.

Upvotes: 1

Burt Beckwith
Burt Beckwith

Reputation: 75671

The initial value that Hibernate uses is 0 but any value is fine.

Upvotes: 2

Related Questions