Skip to content

Releases: neo4j/neo4j-ogm

v4.0.1

21 Dec 13:55
Compare
Choose a tag to compare
  • Fix support for collections in constructor mapping.
  • Allow for classes to be registered dynamically with DomainInfo.
  • Check both index and classpath for known entities.
  • Introduce equals/hashCode for Class/FieldInfo.
  • [dependencies] Upgrade to Neo4j Java Driver 5.3.1.
  • [documentation] Update Neo4j-OGM tutorial..

v3.2.39

19 Dec 16:20
v3.2.39
3a3faa5
Compare
Choose a tag to compare
  • Allow for classes to be registered dynamically with DomainInfo.
  • Introduce simple DTO mapping.
  • Fix testing with local instance.
  • Check both index and classpath for known entities
  • Introduce equals/hashCode for Class/FieldInfo.
  • Make use of driver provider in test.
  • Add this branch to GH workflow.
  • Allow dynamic user and database selection.

Dynamic user and database selection works over Bolt only, make sure you have included the right version of the underlying Neo4j-Java-Driver. It might be that you need to pin it in addition to the OGM dependencies. Configuration should work along these lines:

Configuration ogmConfiguration = new Configuration.Builder()
    .uri("neo4j://yourInstance:7687")
    .credentials("neo4j", "verysecret")
    // In case you need this
    // .databaseSelectionProvider(() -> DatabaseSelection.select("anotherDatabase"))
    // Can also be something that picks the data from a JWT, whatever
    .userSelectionProvider(() -> UserSelection.impersonate("theImposter"))
    // Anything else you need
    .build();

SessionFactory sessionFactory = new SessionFactory(ogmConfiguration, "your.packages");

v4.0.0

29 Nov 11:59
Compare
Choose a tag to compare

New baselines

The minimum required versions are Java 17 and Neo4j 5.x.

Removal of Auto Index Manager

The Auto Index Manager that was responsible for creating indexes and constraints out-of-the-box
got removed from the Neo4j-OGM.
Please use tools like Neo4j-Migrations (has support for Neo4j-OGM annotations out of the box) or Liquibase with the Neo4j-Plugin enabled (needs manual scripts for OGM entities) to control your schema. They offer a broader feature set than just focus on indexes and constraints.
Although the functionality was removed, the annotations are still available. Those will stay in place to avoid refactoring your codebase and support Neo4j-Migrations' annotation processor to make the transition easier.

Removal of HTTP and embedded transport support

Since Neo4j 4.x Neo4j-OGM did not offer embedded transport but the module was still available for users connecting to a 3.5.x instance.
Because the baseline of the official supported database was raised to Neo4j 5.x with this release, the embedded option got deprecated.
The HTTP transport mode was removed because it was rarely used and could not compete with the broad feature set that Bolt allows you to have.

v3.2.38

26 Oct 16:24
v3.2.38
346e5b5
Compare
Choose a tag to compare
  • Revert "Avoid unessary creation of builders."
  • Revert "Make reuse of existing builders threadsafe, check for property equality."

v3.2.37

29 Aug 08:14
v3.2.37
35eb5c6
Compare
Choose a tag to compare
  • [dependencies] Bump classgraph from 4.8.147 to 4.8.149
  • [bug] Make reuse of existing builders threadsafe, check for property equality.
  • [improvement] Optimize class loading.

v3.2.36

08 Jul 14:03
v3.2.36
a60b463
Compare
Choose a tag to compare
  • [bug] Check for literal null properties coming from stored procedures. (#909)

v3.2.35

30 May 07:59
v3.2.35
230029b
Compare
Choose a tag to compare
  • [dependencies] Bump classgraph from 4.8.141 to 4.8.147

v3.2.34

23 May 13:21
v3.2.34
918abaf
Compare
Choose a tag to compare

v3.2.33

11 May 07:31
v3.2.33
a4f65fb
Compare
Choose a tag to compare
  • [refactor] Remove unused methods, improve logging.
  • [test] Fix a flaky test.
  • Increment only version properties of changed relationship entities. (#903, thanks to @BennuFire for his input on that one)
  • [test] Add more tests for #902.
  • [docs] Add latest Neo4j versions as supported.
  • [docs] Improve changelog entry.

v3.2.32

25 Mar 14:55
v3.2.32
fa270ec
Compare
Choose a tag to compare
  • [bug] Don't flatten collections of known entities. (#902)
  • [improvement] Avoid unnecessary creation of builders.

Heads up

60e5f51 (the fix for #902) can lead to breaking changes in some custom queries (all queries having several levels of nested lists of domain objects). They have been incorrectly flattened before that change and their structure will be preserved afterwards.

An example. A query returning

[[n0, n1, n2], [n3], [n4], [n5, n6]]

with n1..6 being known domain objects will be flattened to a [n1, n2, n3, n4, n5, n6] prior to 3.2.32.
The above structure will now be preserved.

This also applies to pattern comprehensions like those:

MATCH (n:Movie{title:'Pulp Fiction'}) return n, [(n)-[r:UNKNOWN]-(p) | [r,p]] as relAndNode

prior to the fix, relAndNode would have been returned as a single array. Now it will be returned as a collection of arrays, exactly what the comprehension states.

See the notes in the linked commit and this comment.