[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7106) Documentation doesnt explain how to create audited tables

Lukasz Antoniak (JIRA) noreply at atlassian.com
Sun Feb 26 09:41:50 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-7106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45688#comment-45688 ] 

Lukasz Antoniak commented on HHH-7106:
--------------------------------------

Paul, review section "15.9. Generating schema with Ant" of Hibernate documentation (http://docs.jboss.org/hibernate/orm/4.0/devguide/en-US/html/ch15.html). If it doesn't contain desired information, please advise what changes would you apply to Envers' chapter.

Another issue is the process of creating audit tables. I will investigate whether it is possible to create them by calling {{new SchemaExport(config).create(true, true);}}.
Audit tables are automatically created if {{Environment.HBM2DDL_AUTO}} property is set to {{create-drop}}.

Regards,
Lukasz

> 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

        


More information about the hibernate-issues mailing list