[forge-issues] [JBoss JIRA] (FORGE-454) Create basic Envers plugin
Dan Allen (JIRA)
jira-events at lists.jboss.org
Wed Jan 25 01:49:18 EST 2012
Dan Allen created FORGE-454:
-------------------------------
Summary: Create basic Envers plugin
Key: FORGE-454
URL: https://issues.jboss.org/browse/FORGE-454
Project: Forge
Issue Type: Feature Request
Components: Builtin Plugins
Reporter: Dan Allen
Priority: Minor
The Envers project aims to enable easy auditing/versioning of persistent classes. All that you have to do is annotate your persistent class or some of its properties, that you want to audit, with @Audited. For each audited entity, a table will be created, which will hold the history of changes made to the entity. You can then retrieve and query historical data without much effort.
Adam Warski has explains the steps required to add Envers to a basic Forge project.
http://www.warski.org/blog/2011/09/envers-bundled-with-jboss-as-7-0-2/
Here are a suggested list of commands:
1. Setup Envers (add the dependency to pom.xml):
setup envers
setup envers --bundle (optional variant that sets the scope to compile instead of provided for servers other than AS 7)
2. Add @Audited to an entity class (auto-complete @Entity classes only)
audit-entity ~.domain.Customer.java
3. Add @Audited to a field (only available in the context of an @Entity class)
audit-field --named lastName
For more ideas, see the reference guide: http://docs.jboss.org/hibernate/envers/3.6/reference/en-US/html/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-issues
mailing list