I want to use lazy locking for concurrency with hibernate. The best approach explained in the book Java persistence with hibernate is to have a class member "private int version".
Now, I already have a database schema. When i reverse engineer the database, I get POJO's. But they lack the "private int version" class member because the database tables do not contain "version" columns. And also they lack the required setting in the XML.
Is there a way to reverse engineer a database and make Hibernate tools add the "version" data member to every generate class and to make the necessary settings in the XML mapping files automatically?
Thank you for your help and time. jenia
|