-
1. Re: Error on Quickstart Envers 1.2.0
adamw Mar 10, 2009 8:31 AM (in response to janger)Hello,
thanks a lot! Fixed.
--
Adam -
2. Re: Error on Quickstart Envers 1.2.0
janger Mar 13, 2009 9:33 AM (in response to janger)No Problem Adam,
I observe the envers-upgrowth for some time now and beside fixed some bugs in 1.1.0 on my own - but you already fixed them in the latest revision, so there was no need to write a patch. Even though I didnt get your code complete, I am impressed what your have done so far! :)
ByTheWay: A nice feature would be a kind of TemporalEntityManager, were u can save an entity directly together with the revisionEntity.
like:tempManager.merge(myFooEntity,new MyRevEntity(somePerson, someChangeReason));
So u dont have to lookup anything in the RevisionListener and u can easy pass some revision-information from the front to the back.
just an idea, maybe crap :)
regards Jan -
3. Re: Error on Quickstart Envers 1.2.0
adamw Mar 14, 2009 8:24 AM (in response to janger)Hello,
the idea might be quite good :). That's true that the current way of handling revision entities is not always very convenient.
Maybe just this would be enough:auditReader.getCurrentRevisionEntity(boolean create)
The method would return the current revision entity, letting you to fill any of the custom fields. The create parameter would specify if a revision entity should be created, even if no audited entities have been modified.
What do you think?
Adam -
4. Re: Error on Quickstart Envers 1.2.0
plsfindwaytovalidateusers Mar 17, 2009 12:58 AM (in response to janger)
How does this map in hibernate.cfg.xml?
In 1.1, I was able to use the<event type="post-insert"> <listener class="org.jboss.envers.event.VersionsEventListener" /> </event>
but I can't seem to adapt it.
Instead, I'm getting
...
Caused by: java.lang.NullPointerException
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateInheritanceMappingData(AuditMetadataGenerator.java:285)
Thanks,
~Ann -
5. Re: Error on Quickstart Envers 1.2.0
adamw Mar 17, 2009 5:47 AM (in response to janger)Hello,
you should just use:<event type="post-insert"> <listener class="org.hibernate.envers.event.AuditEventListener" /> </event>
for all the events.
The NPE looks like a bug. Can you post your entities and configuration? Or even better, create a testcase and attach it to a JIRA bug?
--
Thanks,
Adam -
6. Re: Error on Quickstart Envers 1.2.0
janger Mar 18, 2009 1:43 PM (in response to janger)Hi Adam,
sry for the late reply...
Your idea to put the functionality into the AuditReader looks good. :) Do u plan to implement it?
regards,
Jan -
7. Re: Error on Quickstart Envers 1.2.0
adamw Mar 19, 2009 2:18 AM (in response to janger)Hello,
I suppose yes :). Maybe you can create a feature request in JIRA?
Adam -
8. Re: Error on Quickstart Envers 1.2.0
janger Mar 22, 2009 9:22 AM (in response to janger)Hi Adam,
here is the new JIRA entry:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3823
regards,
Jan -
9. Re: Error on Quickstart Envers 1.2.0
adamw Mar 23, 2009 10:52 AM (in response to janger)Thanks :)