Add opt-in support for Neo4j-OGM native types
This includes tests for the autoconfiguration using that new property. The test require the native types for Bolt and embedded in the test scope, so the Neo4j-OGM native types have been added to managed dependencies. The enhanced autoconfiguration throws an InvalidConfigurationPropertyValueException when native types cannot be used due to missing dependencies or wrong transport mode. See gh-15637
This commit is contained in:
committed by
Andy Wilkinson
parent
c8070f4408
commit
af21b847a0
@@ -4440,6 +4440,25 @@ in your configuration, e.g. `spring.data.neo4j.uri=file://var/tmp/graph.db`.
|
||||
|
||||
|
||||
|
||||
[[boot-features-neo4j-ogm-native-types]]
|
||||
==== Using native types
|
||||
Neo4j-OGM can map some types, like `java.time.*` to `String` based properties or
|
||||
use one of the various native types that Neo4j provides.
|
||||
For backwards compatibility reasons the default for Neo4j-OGM is using a `String` based representation.
|
||||
To change that behaviour, please add one of `org.neo4j:neo4j-ogm-bolt-native-types` or `org.neo4j:neo4j-ogm-embedded-native-types`
|
||||
to the dependencies of your application
|
||||
and use the following property in your Spring Boot configuration:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.data.neo4j.use-native-types=true
|
||||
----
|
||||
|
||||
Please refer to the Neo4j-OGM reference for more information about
|
||||
https://neo4j.com/docs/ogm-manual/current/reference/#reference:native-property-types[native property types].
|
||||
|
||||
|
||||
|
||||
[[boot-features-neo4j-ogm-session]]
|
||||
==== Neo4jSession
|
||||
By default, if you are running a web application, the session is bound to the thread for
|
||||
|
||||
Reference in New Issue
Block a user