Given the latest release of neo4j-ogm is now using the updated 4.x driver:
I'm having trouble finding the docs for how to configure the default database for the OGM driver to connect to on startup (let's say test.db). Today that's handled at the neo4j.conf level but with multi-tenant databases that now relies on the client.
Looking at the SDN-RX project this is done using the driver directly:
Given the tight coupling of Spring with OGM we're looking to see if we can use 4.x with OGM + multi-tenency before migrating to SDN-RX in the future.
Was thinking the relevant attributes would be found here? https://neo4j.com/developer/java-driver-spring-boot-starter/#_configuration_options
Solved! Go to Solution.
Along the spring default, you configure the default ogm connection within "application.properties" as described in https://neo4j.com/developer/spring-data-neo4j-rx/ , section "2.2.3. Configuration".
Using more elaborated spring configuration options as "profiles", you could end up having a variety of property files like "application-dev.properties", "application-test.properties", "application-integration.properties", each with different database configuration settings.
This is also possible using YAML files.
Studying the spring configuration options, you find a bunch helpful ways to accomplish the most elaborated "default", "profiled", "fallback" configurations.
Looking at the driver configuration for multi tenancy:
You can apply a multi tenancy schema by
a) one database engine instance accessed by one ip socket address serving one database configured with access rights and roles along the tenancy model
b) one database engine instance accessed by one ip socket address serving multiple databases, optionally configured with access rights and roles along the tenancy model. the client is required to explicitly address the database instance wanted aka "USE "
c) multiple database engine instances, each accessed by another ip socket address serving one or multiple databases, optionally configured with access rights and roles along the tenancy model. the . Or you have multiple different database engine instance, each with a different socket address.
You will address a certain database engine instance by a TCP/IP socket connection consisting of hostname/ip and port. ( e.g. fabric configuration: https://neo4j.com/docs/operations-manual/4.0-preview/fabric/configuration/)