-
1. Re: Work around for unsupported Annotations
agnimidhun Feb 15, 2010 12:06 AM (in response to agnimidhun)Just to update, I get the following error on an Annotation like this :
@DiscriminatorFormula("case when COL1 IS NULL then 'ABC' else 'XYZ' end")
Error:
Caused by: java.lang.ClassCastException: org.hibernate.mapping.Formula
at org.hibernate.envers.configuration.metadata.MetadataTools.addColumns(MetadataTools.java:177)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateMappingData(AuditMetadataGenerator.java:317)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:424)
at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:100)
at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:87)
at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99)
at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:315)
at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
... 47 more -
2. Re: Work around for unsupported Annotations
adamw Feb 15, 2010 4:20 AM (in response to agnimidhun)1 of 1 people found this helpfulWell, you could mark such properties with @NotAudited, but then the content won't be audited.
If you'd like to have these audited, Envers would have to support such mappings.
Adam
-
3. Re: Work around for unsupported Annotations
agnimidhun Feb 15, 2010 8:52 AM (in response to adamw)Hi Adam,
Thank you for the reply. But we needed these Entities to be audited (Infact I was testing an important module which needs to be audited and found these errors). Any idea when would Envers be able to support such mappings ?
This is the last chance I have got to try to implement Envers - or else we would be going ahead with the conventional trigger based Audit tables.
Thanks,
Midhun
-
4. Re: Work around for unsupported Annotations
adamw Feb 15, 2010 9:06 AM (in response to agnimidhun)Well support for these features is on the roadmap but I am not able to tell you when they will be implemented. Most probably when a user submits a patch (maybe you would like to take a look at the source code?) or when I need it .
There is also commercial support available by SoftwareMill (http://www.softwaremill.eu), which includes new feature development.
Adam
-
5. Re: Work around for unsupported Annotations
mit_jones Feb 18, 2010 8:49 AM (in response to adamw)looks to be the same issue as http://opensource.atlassian.com/projects/hibernate/browse/HHH-4073