[
https://hibernate.onjira.com/browse/HHH-7106?page=com.atlassian.jira.plug...
]
Paul Taylor commented on HHH-7106:
----------------------------------
Thanks, yes the first line of 15.9 says 'If you'd like to generate the database
schema file with the Hibernate Tools Ant task, you'll probably notice that the
generated file doesn't contain definitions of audit tables.' but I didn't want
to generate schema from ant because I dont use ant (I use maven) so I ignored this
section. I incorrectly assumed they would be created by new
SchemaExport(config).create(true, true) like the other table are without
Environment.HBM2DDL_AUTO being set but they are not.
Documentation doesnt explain how to create audited tables
---------------------------------------------------------
Key: HHH-7106
URL:
https://hibernate.onjira.com/browse/HHH-7106
Project: Hibernate ORM
Issue Type: Bug
Components: envers
Affects Versions: 4.0.1
Reporter: Paul Taylor
The documentation doesnt explain how to create audited tables, it implies by just putting
evers on your classpath (and creating event listeners on versions of hibernate earlier
than 4) it will just work but it doesn't. To get it to work I add to add
config.setProperty(Environment.HBM2DDL_AUTO, "create-drop");
to my configuration, without this a call to
new SchemaExport(config).create(true, true);
would not create the audited tables.
Even now I'm not sure this is the correct way to do things but it is the only thing
I've got to work. Although you might think this an unimportant issue because it is
only documentation you would underestimate how difficult and fustrating it is to deleve
into a new project when the documentation is inadequate, it almost led to be abandoning
Envers.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira