javers

Javers Comparing Lists

随声附和 提交于 2019-12-12 05:28:33
问题 I'm attempting to convert a diff on two lists of Entities into a more human readable format by interpreting container changes (v1.6.0). If I have a List of Entities (listBefore): entity1 entity2 entity3 entity4 and I reorder the list (listAfter) entity1 entity4 entity2 entity3 The result of comparing these lists using Javers.compareCollections( listBefore, listAfter, Entity.class ) is: containerChanges:[(3).removed:'entity4', (1).added:'entity4'] From this I can deduce that: entity4 moved

Javers SQL connections in use forever

二次信任 提交于 2019-12-12 04:05:46
问题 I have a problem with database connections not being 'released' by javers. We are using Hibernate 5.0.6, Hikari as our connection pool and the MSSQL Server as our database. Javers is configured as follows (snippet): JaversBuilder.javers(). registerJaversRepository(SqlRepositoryBuilder.sqlRepository(). withConnectionProvider(() -> ((SessionFactoryImpl) sessionFactory).getServiceRegistry(). getService(org.hibernate.engine.jdbc.connections.spi.ConnectionProvider.class).getConnection()).

Is there possibility to provide object dependent map for CommitPropertiesProvider?

时光毁灭记忆、已成空白 提交于 2019-12-11 17:07:27
问题 I'm using Javers to tracking record history change (on ModerationEntity) and have the necessary to retrieve it with some criteria in my specific case is filter some of them that have the ListEntity (id = 51). ModerationEntity { "requestedPublicationStatus": "PUBLISHED_NATIONAL", "currentPublicationStatus": "UNPUBLISHED", "id": 1000004, "list": { "entity": "ListEntity", "cdoId": 51 }, "status": "IN_MODERATION" } After looking around on the Javers JQL Example I didn't find any solution to deal

Javers ENTITY_INSTANCE_WITH_NULL_ID when using 2 databases

天涯浪子 提交于 2019-12-11 01:46:11
问题 I have this exception "ENTITY_INSTANCE_WITH_NULL_ID" when I store data in Postgres (using JPA Lazy Load) and I store javers in MongoDB Spring Boot: 1.4.0.RELEASE Sprig Data JPA: 1.4.0.RELEASE Javers: 2.3.0 I debugged and saw that ID is null if object is a lazy object: org.javers.core.metamodel.type.EntityType:88 "Object cdoId = getIdProperty().get(instance);" 回答1: When you commit an object to JaVers, its previous version is loaded from JaversRepository and compared with the current version

Javers - What are advantages of using Javers instead of Envers?

谁都会走 提交于 2019-12-08 02:52:01
问题 I am developing a RESTful API using Spring Data REST. Now for auditing, Spring does have the option to auditing meta data like created_date and modified_date but they don't provide entity versioning. Currently there are two popular libraries for entity version which are Envers and Javers. I have looked over for a comparison of both but there arent any articles on this matter. So what are the benefits and drawbacks of using Javers over Envers? 回答1: There are two big difference between JaVers

Javers - What are advantages of using Javers instead of Envers?

淺唱寂寞╮ 提交于 2019-12-06 11:21:45
I am developing a RESTful API using Spring Data REST. Now for auditing, Spring does have the option to auditing meta data like created_date and modified_date but they don't provide entity versioning. Currently there are two popular libraries for entity version which are Envers and Javers. I have looked over for a comparison of both but there arent any articles on this matter. So what are the benefits and drawbacks of using Javers over Envers? There are two big difference between JaVers and Envers: Envers is the Hibernate plugin. It has good integration with Hibernate but you can use it only