Release notes

3.3.2

released on 2017-06-25

  • 546 Arrays on Value position are now compared using Arrays.equals().

3.3.1

released on 2017-06-25

  • 33 Fix in PolyJDBC for MsSql, deprecated TEXT column type changed to VARCHAR(MAX)

3.3.0

released on 2017-06-21 at Devoxx PL, Cracow

  • Added possibility to register the CustomValueComparator function for comparing ValueTypes (it works also for Values stored in Lists, Arrays and Maps). Solved issues: 492, 531.

For example, BigDecimals are (by default) ValueTypes compared using BigDecimal.equals(). Now, you can compare them in the smarter way, ignoring trailing zeros:

 javersBuilder.registerValue(BigDecimal.class, (a,b) -> a.compareTo(b) == 0);

3.2.1

released on 2017-06-12

  • 32 Fix in PolyJDBC for MySql INSERTS with autoincrement.

3.2.0

released on 2017-05-26

  • 133 New JQL queries — Shadows. See Shadow query examples.

  • 455 Fixed error in schema creation on MySQL database with non UTF-8 encoding — MySQL error: Specified key was too long; max key length is 767 bytes

3.1.1

released on 2017-05-07

  • 532 Added the method to clear sequence allocation in PolyJDBC. See JaversSqlRepositoryevictSequenceAllocationCache().

  • 539 Added annotation priorities. Now, Javers’ annotations have priority over JPA annotations.

3.1.0

released on 2017-03-27

  • 403 Added @PropertyName annotation. Now, property names can be customized which means easier domain classes refactoring.

  • 27 Fixed resource leak in PolyJDBC.

3.0.5

released on 2017-03-24

  • 524 Fixed version conflict between Hibernate and Spring Boot. Hibernate version downgraded to 5.0.11.Final

3.0.4

released on 2017-03-14

  • 505 Empty commits (with zero snapshots) are no longer persisted.

3.0.3

released on 2017-03-05

  • 507 BigInteger added to the list of well known Value types.

3.0.2

released on 2017-03-02

  • 501 Fixed exception (Don’t know how to extract Class from type) for complex class hierarchies with generic type variables.

  • 499 Fixed problem with hash collision for some method names.

3.0.0 — Java 8 release

released on 2017-02-01

We rewrote whole JaVers’ code base from Java 7 to 8.
Now, JaVers is lighter, faster, and more friendly for Java 8 users.

Breaking changes

  • All javers-core classes like: Change, Commit, or CdoSnapshot now use standard Java 8 types java.util.Optional and java.time.LocalDateTime.

  • The old good Joda Time is no longer used in javers-core but still supported in users’ objects.

  • JaVers’ Optional is removed.

  • All @Deprecated methods in public API are removed.

  • Since 3.0, JaVers is not runnable on Java 7 Runtime. If you still use Java 7, stay with 2.9.2 version, which will be maintained for a while, but only for bug fixing.

Misc

  • All JaVers’ dependencies are bumped to the latest versions:
gson :                   2.8.0
mongo-java-driver :      3.4.2
picocontainer :          2.15
fast-classpath-scanner : 2.0.13
spring :                 4.3.6.RELEASE
spring-boot :            1.4.4.RELEASE
hibernate :              5.2.7.Final
joda :                   2.9.7 (optional)
guava :                  21.0  (optional)

  • SQL Repository schema migration scripts for JaVers 1.x are removed. Upgrade from JaVers 1.x to 3.0 is still possible, but first run 2.9.x to perform overdue SQL Repository schema migration.

3.0.0-RC

released on 2017-01-28

2.9.2 — the last version runnable on Java 7 Runtime

released on 2017-01-25

  • 494 Fixed bug in MongoRepository introduced in 2.9.1 (IllegalArgumentException for Boolean JsonPrimitive).

2.9.1

released on 2017-01-17

  • 489 MongoRepository performance optimization.

2.9.0

released on 2017-01-14

  • #132 Implemented support for Guava’s Multiset and Multimap.

2.8.2

released on 2017-01-03

  • #485 Fixed MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes when creating indexes on MySQL.

2.8.1

released on 2016-12-13

  • #475 Fixed concurrency issue in SQL sequence generator resulting in SequenceLimitReachedException: [SEQUENCE_LIMIT_REACHED]

2.8.0

released on 2016-12-09

  • #476 Added support in javers-spring for multiple Spring Transaction Managers.
    Since now, transactionManager bean should be explicitly provided when configuring javers bean:
    @Bean
    public Javers javers(PlatformTransactionManager txManager) {
        JaversSqlRepository sqlRepository = SqlRepositoryBuilder
                .sqlRepository()
                .withConnectionProvider(jpaConnectionProvider())
                .withDialect(DialectName.H2)
                .build();

        return TransactionalJaversBuilder
                .javers()
                .withTxManager(txManager)
                .withObjectAccessHook(new HibernateUnproxyObjectAccessHook())
                .registerJaversRepository(sqlRepository)
                .build();
    }

See full example of Spring configuration.

  • #461 Fix for CANT_DELETE_OBJECT_NOT_FOUND excepting throw from @JaversSpringDataAuditable aspect when deleted object not exists in JaversRepository.

2.7.2

released on 2016-11-29

  • #467 Fixed bug in GlobalId PK cache in SQl Repository. Now, when Spring Transaction Manager rolls back a transaction, the cache is automatically evicted.

  • #462 Fixed problem with commit property column size in SQL databases. Max length increased from 200 to 600 characters.

2.7.1

released on 2016-11-17

  • #457 Fixed problem with Bean Mapping Style due to Type Erasure.

2.7.0

released on 2016-11-10

2.6.0

released on 2016-10-30

  • #411 New commitId generator for distributed applications. Now you can use cluster-friendly CommitIdGenerator#RANDOM, see withCommitIdGenerator()

  • #209 Added multi-class query — QueryBuilder.byClass(Class... requiredClasses).

  • #435 Added flags for deactivating auto-audit aspects in Spring Boot starters.

javers:
  auditableAspectEnabled: false
  springDataAuditableRepositoryAspectEnabled: false

2.5.0

released on 2016-10-26

  • #412 @ShallowReference annotation can now be used for properties.

  • Empty snapshots for @ShallowReference Entities are no longer created.

  • #443 Fix for Gson stackoverflow exception when using complex Value types (with circular references).

2.4.1

released on 2016-10-18

  • #441 UUID added to list of well known ValueTypes.

2.4.0

released on 2016-10-12

2.3.0

released on 2016-09-21

  • #263 @TypeName annotation scanner implemented. Now you can easily register your classes with the @TypeName annotation in order to use them in all kinds of JQL queries
    (without getting TYPE_NAME_NOT_FOUND exception). See JaversBuilder.withPackagesToScan(String packagesToScan).

2.2.2

released on 2016-09-09

  • #430 Added @ConditionalOnMissingBean on javers bean.

2.2.1

released on 2016-09-06

  • #417 Fixed dependency management in javers-spring. Now spring-data-commons dependency is optional and should be on an application’s classpath only when you are using the @JaversSpringDataAuditable annotation.
    The aspect class JaversAuditableRepositoryAspect was removed and split into two aspects: JaversAuditableAspect and JaversSpringDataAuditableRepositoryAspect.
    First one should be enabled when you are using @JaversAuditable. Second one should be enabled when you are using @JaversSpringDataAuditable.
    If you are using javers-spring-boot-starter-*, both aspects are enabled by default so you don’t have to change anything.
    See auto-audit aspects documentaton.

  • #425 Fixed some bugs in ShallowReference type handling.

2.1.2

released on 2016-08-28

  • #416 Added map key dot replacement in MongoRepository.

  • #415 Key in TypeMapperState.mappedTypes changed from Type to Type.toString().

2.1.1

released on 2016-07-30

  • #395 Spring Boot version bumped to 1.4.0-RELEASE, fixed MongoDB Driver version conflict between JaVers and spring-data-mongodb.

2.1.0

released on 2016-07-28

  • #220 New aggregate filter in JQL. Now child ValueObjects can be selected when querying for Entity changes. See childValueObjects filter example.

  • #408 Added equals() and hashCode() in ContainerElementChange and EntryChange classes.

2.0.4

released on 2016-07-23

  • #407 Fixed bug that causes PropertyChange.equals() to always return false.

  • #394 Error message enhancement.

2.0.3

released on 2016-06-29

  • #396 Fixed javers-spring integration problem: cannot access its superclass org.javers.spring.jpa.JaversTransactionalDecorator.

2.0.2

released on 2016-06-17

  • #388 Fixed ORA-00972 when creating the JaVers schema in Oracle 12c

2.0.1

released on 2016-06-15

  • #384 Value-based equals() and hashCode() implemented in concrete Change types
  • #380 Fixed CLASS_EXTRACTION_ERROR for non-concrete array types (like T[])

2.0.0

released on 2016-06-09

JaVers 2.0 comes with major improvements and new features in JQL.

Unified semantics of changes and snapshot queries
In JaVers 2.0, change queries work in the same way as snapshot queries and change queries accept all filters.

For example, in JaVers 1.x, this change query:

javers.findChanges(QueryBuilder.byInstanceId(Person.class,1).withVersion(5).build());

returns empty list, which is not very useful.

In JaVers 2.0 this query returns changes introduced by the selected snapshot, so changes between versions 4 and 5 of a given object.

JaVers implements change queries on the top of snapshot queries. Change sets are recalculated as a difference between subsequent pairs of snapshots fetched from a JaversRepository. In 1.x, only explicitly selected snapshots are involved in the recalculation algorithm. In 2.0, for each snapshot selected by a user query, JaVers implicitly fetches previous snapshot (if needed). Thanks to that, change queries are far more useful and they work as you could expect.

New features

SQL Schema migration

JaVers 2.0 comes with the new database schema for SQL repository:

  • table jv_cdo_class is no longer used
  • new column jv_global_id.type_name
  • new column jv_snapshot.managed_name
  • new table jv_commit_property

JaVers automatically launches a data migration script when old schema is detected. Data from jv_cdo_class are copied to new columns (jv_global_id.type_name and jv_snapshot.managed_name). It should take a few seconds for medium size tables but for very large tables it could be time consuming.

Breaking changes
The only one breaking change is new semantics of changes query which is actually an improvement.

If you are using SQL repository, and your jv_snapshot table is large (millions of records), run JaVers 2.0 on your test environment for the first time and check if data migrations is done correctly.

1.6.7

released on 2016-05-06

  • #368 Improvements in Spring Boot starters. SpringSecurityAuthorProvider bean is created by default when SpringSecurity is detected on classpath.

1.6.4

released on 2016-04-26

  • #362 Default behaviour for non-parametrized Collections instead of throwing JaversException: GENERIC_TYPE_NOT_PARAMETRIZED.

1.6.3

released on 2016-04-17

  • #361 Fixed bug in schema migration for MsSql Server.

1.6.2

released on 2016-04-13

  • #355 Fixed exception handling in JaversAuditableRepositoryAspect.

  • #216 JQL - added basic support for nested ValuObjects queries.

1.6.1

released on 2016-04-12

  • #353 Fixed misleading error message for raw Collections fields.

  • #18 Fixed resource leak in PolyJDBC, resulting in ORA-01000: maximum open cursors exceeded (Oracle).

1.6.0

released on 2016-03-16

  • #191 Added support for sets of ValueObjects, SET_OF_VO_DIFF_NOT_IMPLEMENTED exception should not appear anymore.

1.5.1

released on 2016-03-04

  • #344 Fixed bug in Spring Boot starter for SQL. Dialect autodetection now works properly.

1.5.0

released on 2016-02-28

  • New JaVers Spring Boot starter for SQL and Spring Data — javers-spring-boot-starter-sql. See Spring Boot integration.

  • Starting from this version we use SemVer scheme for JaVers version numbers.

1.4.12

released on 2016-02-25

  • #341 Fixed bug TyeMapper — infinite loop for certain Type cycles in user classes.

1.4.11

released on 2016-02-12

  • #333 GroovyObjects support. Now JaVers can be used in Groovy applications. See Groovy diff example.

  • @DiffIgnore can be used on class level (for example, GroovyObjects support is implemented by ignoring all properties with groovy.lang.MetaClass type). See class annotations.

  • #211 New annotation @ShallowReference added. It can be used as the less radical alternative to @DiffIgnore. See ignoring things.

1.4.10

released on 2016-02-02

  • #325 Fixed bug in persisting commitDate in SQL repository.

  • #249 Fixed bug in JSON deserialization of Id property with Type tokens.

  • #192 Added support for well-known Java util types: UUID, File and Currency.

  • #16 Fixed bug in PolyJDBC sequence generating algorithm.

1.4.7

released on 2016-01-29

1.4.5

released on 2016-01-25

1.4.4

released on 2016-01-20

  • #286 New properties in ReferenceChange: getLeftObject() and getRightObject().

  • #294 Added version number to Snapshot metadata: CdoSnapshot.getVersion().

    Warning!

    All snapshots persisted in JaversRepository before release 1.4.4 have version 0. If it isn’t OK for you, run DB update manually.

    For SQL database:

    UPDATE jv_snapshot s SET version = (
    SELECT COUNT(*) + 1 FROM jv_snapshot s2
    WHERE s.global_id_fk = s2.global_id_fk and s2.snapshot_pk < s.snapshot_pk)
    

1.4.3

released on 2016-01-18

1.4.2

released on 2016-01-15

1.4.1

released on 2016-01-08

1.4.0

released on 2015-12-18

  • Added @TypeName annotation and support for domain classes refactoring, see Entity refactoring example. Fixed issues: #178, #232.
  • #192 Fixed bug in persisting large numbers in MongoDB.
  • #188 Diff is now Serializable.

Breaking changes:

  • Most of @Deprecated API removed.
  • Slight API changes in few places.
  • GlobalId is now decoupled from ManagedType, reference from globalId to concrete managedType is replaced with typeName String field.
  • PropertyChange is now decoupled from Property, reference from propertyChange to concrete property is replaced with propertyName String field.
  • Visibility of ManagedClass is reduced to package private.

1.3.22

released on 2015-11-27

  • #250 Added missing mapping for CharSequence.

1.3.21

released on 2015-11-13

  • #247 Fixed bug while querying for a ValueObject stored as a Map value.

1.3.20

released on 2015-11-08

1.3.18

released on 2015-11-04

  • #244 Added support for upper-bounded wildcard types, like List<? extends Something>. Contributed by dbevacqua.

1.3.17

released on 2015-10-17

  • #224 Fixed bug in org.javers.common.collections.Optional.equals() which caused strange ClassCastException.

1.3.16

released on 2015-10-14

  • #221 Fixed JaversException.CANT_SAVE_ALREADY_PERSISTED_COMMIT thrown when concurrent writes happened to hit JaversSqlRepository.

1.3.15

released on 2015-10-13

  • Fixed Java 7 compatibility problem introduced in the previous version.

1.3.14

released on 2015-10-13

  • #218 Fixed concurrency issue in TypeMapper which caused ClassCastExceptions, i.e.: java.lang.ClassCastException: com.example.MyObject cannot be cast to org.javers.core.metamodel.object.GlobalId

1.3.13

released on 2015-10-09

  • #207 Fixed bug in serialization ValueObject arrays. Fixed bug in comparing deserialized primitive arrays.

1.3.12

released on 2015-10-03

  • #208 Added support for legacy date types: java.util.Date, java.sql.Date, java.sql.Timestamp and java.sql.Time. Added milliseconds to JSON datetime format. All local datetimes are now serialized using ISO format yyyy-MM-dd'T'HH:mm:ss.SSS.

1.3.11

released on 2015-10-01

  • #213 Fixed bug in calculating changed properties list in CdoSnapshot.getChanged() for nullified values.

1.3.10

released on 2015-09-30

  • #206 Fixed NPE when reading ValueObject changes from SQL repository. It was caused by error in serializing ValueObjectId to JSON.

1.3.9

released on 2015-09-24

  • #205 Fixed AFFECTED_CDO_IS_NOT_AVAILABLE JaVers runtime error when serializing Changes to JSON using Jackson.

1.3.8

released on 2015-09-21

  • #126 Added support for Java 8 java.util.Optional and types from Java 8 Date and Time API (like java.time.LocalDateTime). JaVers can still run on JDK 7.
  • #197 Added JSON prettyPrint switch — JaversBuilder.withPrettyPrint()
  • #199 Added support for comparing top-level Arrays, i.e.: javers.compare(new int[]{1}, new int[]{1,2}). Contributed by Derek Miller.

1.3.5

released on 2015-09-15

  • #195 Added support for JPA @EmbeddedId annotation.

1.3.4

released on 2015-08-24

  • #190 Fixed bug in ManagedClassFactory, Id property can be registered even if it has @Transient annotation.

1.3.3

released on 2015-08-12

  • Javers-hibernate module merged to javers-spring.
  • #186 Fixed another concurrency issue in CommitSequenceGenerator.

1.3.2

released on 2015-08-09

  • #186 fixed concurrency issue in CommitSequenceGenerator

1.3.1

released on 2015-08-03

  • #182 fixed ConcurrentModificationException in TypeMapper

1.3.0

released on 2015-07-17

  • #100 MS SQL support in JaversSQLRepository
  • Oracle support in JaversSQLRepository

1.2.11

released on 2015-06-30

  • Added On Access Hook
  • #172 Hibernate support enabled using On Access Hook feature

1.2.10

released on 2015-06-12

  • #172 Fixed bug when registering more than one CustomPropertyComparator
  • #167 Fixed bug in Levenshtein algorithm (comparing lists of Entities)

1.2.9

released on 2015-06-10

  • Pretty-print feature: javers.getTypeMapping(Clazz.class).prettyPrint() describes given user’s class in the context of JaVers domain model mapping.

1.2.8

released on 2015-05-31

  • #142 Fixed bug when mapping Entity hierarchies with custom idProperty.

1.2.7

released on 2015-05-29

  • Fixed problem with build 1.2.6, which wasn’t built from the master branch

1.2.6

released on 2015-05-26

  • #157 Fixed JsonIOExcpetion when trying to deserialize property with nested generic type. Contributed by Dieler.

1.2.5

released on 2015-05-24

  • #146 #156 MongoDB Java Driver updated to 3.0. Thanks to that, JaVers is compatible with MongoDB versions: 2.4, 2.6 and 3.0.

1.2.1

released on 2015-05-18

  • #127 Implemented tolerant comparing strategy for ValueObjects when one has more properties than another. For example, now you can compare Bicycle with Mountenbike extends Bicycle.

1.2.0 JQL

released on 2015-04-20

  • #36 Javers Query Language. New fluent API for querying JaversRepository. New query types: by class, by property and more, See JQL examples.
  • #98 Track changes in collection. Tracking VO changes while looking at master Entity.
  • #118 API to get change history for a given property.
  • #128 Changes of a set of entities.
  • #129 Lists: newObject and ValueChange?

1.1.1

released on 2015-03-17

1.1.0

released on 2015-03-13

  • #67 JaversSQLRepository with support for MySQL, PostgreSQL and H2.
  • #89 Spring JPA Transaction Manager integration for Hibernate.

1.0.7

released on 2015-02-25

  • #47 Spring integration. Added @JaversAuditable aspect for auto-committing changed done in Repositories.
    gessnerfl contributed @JaversSpringDataAuditable, which gives a support for Spring Data Repositories.

1.0.6

released on 2015-02-10

  • #94 Specifying ignored properties without annotations.
    Reported by Chuck May.

1.0.5

released on 2015-02-01

  • #76 AddedSupport for nested generic types like List<List<String>> or List<ThreadLocal<String>>. Reported by Chuck May
  • Fixed NPE in MongoRepository.

1.0.4

released on 2015-01-20

  • #80 Added custom comparators support. This allows you to register comparators for non-standard collections like Guava Multimap.

1.0.3

released on 2015-01-12

  • #47 Spring integration. Added @JaversAuditable annotation for repository methods.

  • #77 Added missing feature in Generics support.
    Reported by Bryan Hunt.

  • #71 Tracking a top-level object deletion.
    Reported by Chuck May.

1.0.2

released on 2015-01-08

  • #78 NullPointerException at ReflectionUtil.getAllFields() when using interface as a variable type.

1.0.1

released on 2015-01-03

  • #73 Listing newObject event on change history.
    Reported by Chuck May.

1.0.0

released on 2014-12-25

  • Production-ready release with stable API.