Hi,
In my project I have to save the data change log. For this we are using the Hibernate Envers, but there is no table REFINFO in my database that's why its giving following error:
Hibernate Envers - REVINFO table doesn't exist
How to resolve this?
Thanks
Hi,
There are two options: a) Create this table manually in your database. In case of MySQL you can use the following query:
CREATE TABLE `revinfo` ( `REV` int(11) NOT NULL AUTO_INCREMENT, `REVTSTMP` bigint(20) DEFAULT NULL, PRIMARY KEY (`REV`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
b) Allow hibernate to create table automatically. For this add following property in the hibernate.cfg.xml file:
<property name="hibernate.hbm2ddl.auto">update</property>
After adding about property Hibernate will create table automatically.
Hope above information will help you in solving the problem.
Thanks
Hi, Learn how to create Hibernate 5 Annotation Example.
Check source code at the page Hibernate 5 Annotation Example.
Thanks
Ads