hibernate-envers Questions

3

I migrate to Hibernate 6.4.1 (via spring boot 3.2.1) and my app logs an error that wasnt' there before: 2024-01-03T15:49:10.361+01:00 ERROR 81857 --- [ main] o.h.metamodel.internal.MetadataContext...
Viticulture asked 3/1 at 17:2

3

Solved

I am using hibernate-envers with spring. Everything works just fine, except when I delete an entity, it does not change the values of updated_by and updated_date inside audit table, instead it save...
Grinder asked 13/11, 2019 at 8:48

2

In my audited entity I have last modified fields: @LastModifiedBy private String lastModifiedBy; @LastModifiedDate private OffsetDateTime lastModifiedDate; But they doesn't change when enti...
Platinumblond asked 27/11, 2019 at 13:51

4

Solved

I have 3 ways things get written to the DB public void create(T object) { entityManager.persist(object); } public void update(T object) { object = entityManager.merge(object); } public int upd...
Topdress asked 3/1, 2013 at 13:27

4

Solved

I am using Spring 5.1 and Hibernate 5.3.9 including hibernate-envers. I don't know how to inject spring beans into the hibernate envers custom RevisionListener. I have tried (@Service or @Compo...
Presswork asked 12/9, 2019 at 8:9

2

Solved

I am migrating to SpringBoot 3.0.1 and updated "hibernate-envers" version to "6.1.6.Final". My DB is PostgreSQL 13.6. Hibernate is configured to create the DB schema: spring.jpa...
Posada asked 27/12, 2022 at 12:20

5

I am using Hibernate 4.3.4 with Envers, and MySql 5.6. Without a JPA 2.1 converter, the Party entity below fails at Configuration.buildSessionFactory() as it should, since Hibernate doesn't know w...
Sidky asked 12/3, 2014 at 17:10

7

Solved

I'm adding envers to an existing hibernate entities. Everything is working smoothly so far as far as auditing, however querying is a different issue because the revision tables aren’t populated wit...
Swedenborgianism asked 22/5, 2009 at 15:38

3

I'm using Hibernate 4.3.6, and I tried making use of the Envers functionality by adding the @Audited annotation to one of my @Entity classes. (The envers jar - hibernate-envers-4.3.6.Final.jar - is...
Suckerfish asked 6/10, 2014 at 17:38

2

Solved

How can I disable Hibernate Envers in Spring Boot 2? I don't want to remove the dependency, because the code relies on it depending on the environment. I tried the following properties in my appli...
Unexpressed asked 16/11, 2018 at 11:39

2

Solved

Using Hibernate Envers, while doing create operation audit functionality is properly working data is correctly filled up in main as well as audit table but while deleting an entry for few fields it...
Sill asked 10/5, 2017 at 13:58

4

Solved

I would like to write tests about revision. In the console I see the update call of Hibernate, BUT no insertions into AUD-Table. Test-Method: @DataJpaTest class JPAHistoryTest { @Test public v...
Andorra asked 20/1, 2018 at 18:4

4

Solved

I'm trying to setup Hibernate Envers to work with my Spring Boot application. I've included the Envers dependency and added @Audited annotations and it works fine, but I'm unable to configure spec...
Confiture asked 5/5, 2014 at 10:17

3

We have just started using Hibernate Envers, and it works well for logging what changed, however, is there a way that it can also log when the change happened? So, can it add a datetime column to...
Unroof asked 16/2, 2016 at 13:13

2

Solved

The following database schema: Employee[EMP_ID (PK), name, salary] Phone[ID (PK), number_str, OWNER_ID (FK)] Employee_aud[EMP_ID (PK), REV (PK/FK), REVTYPE, name, salary] Phone_aud[ID (PK), REV...
Callida asked 5/11, 2013 at 18:1

5

I'm trying to build some tests around some audited entities. My problem is that envers only audits on a transaction commit. I need to create/edit some test objects, commit the transaction and then...
Vibratory asked 2/12, 2011 at 23:7

4

Solved

I am trying to retrieve the latest revision of all entities, that have not been deleted. Doing this in SQL is very simple with an subselect: select * from article_aud aud1 where rev in (select ma...
Badmouth asked 31/7, 2012 at 14:25

2

Solved

I have a classic inheritance persistence with entities Parent and Child, where Child extends Parent. Class Parent is abstract, while Child is not. I want to audit Child. This entity is under my co...
Rock asked 15/12, 2015 at 19:8

1

I really have a weird issue now. I just want to delete an entity. I am also using Hibernate envers for auditing. So now I want to delete this entity. Now I get following message. com.mysql.j...
Backswept asked 26/9, 2019 at 11:38

5

I have a requirement where I want to audit records only on change of Status field. I've followed documentation chapter tutorial "15.8. Conditional auditing". Step 1: Turn off automatic Envers even...
Pointed asked 10/1, 2013 at 3:57

3

I am using spring-data-envers in my spring boot application. I can successfully log the audits on my entities. Now, I need to show audited data to the user in UI. Like there will be search form w...
Felicio asked 15/3, 2016 at 10:17

2

Solved

How can I log the changes of the entity into log files? Consider I have Person like this. import org.hibernate.envers.Audited; import javax.persistence.Entity; import javax.persistence.Id; import...

2

There is application spring+jpa+envers(hibernate) envers needs to save history of entities in special table. After I saved a few times my entity, I expected to see filled version field in USER tab...
Aiguillette asked 18/1, 2019 at 12:30

3

Solved

I'm developing an application using JPA 2.1 (supported by hibernate 4.2.11) with spring 4.0.2. We are using Envers for auditing changes in project entities. That is working fine. The problem comes ...
Anatolic asked 29/5, 2014 at 17:17

3

Solved

@NotAudited @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED) @OneToMany(mappedBy = "booking") @OrderBy("bookingOrder") private List<CustomerBooking> customerBookingList = new L...
Trommel asked 14/4, 2011 at 10:12

© 2022 - 2024 — McMap. All rights reserved.