Skip to content

v3.2.39

Compare
Choose a tag to compare
@michael-simons michael-simons released this 19 Dec 16:20
· 443 commits to master since this release
v3.2.39
3a3faa5
  • 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");