Hibernate OGM currently only create indexes in Neo4j if they involved a single porperty. The reason is that when we added See the feature tests in this was package in the only constraint available.
In the latest version is possible to create unique constraints spanning multiple properties. To solve this issue see MongoDB module : * BaseNeo4jSchemaDefiner#addCoinstraint: https://github.com/hibernate/hibernate-ogm/blob/master/neo4j/src/main/java/ org /hibernate/ogm/datastore/neo4j/impl/BaseNeo4jSchemaDefiner . java#L112 * BaseNeo4jSchemaDefiner#createUniqueConstraintsIfMissing: https://github.com/ hibernate /hibernate- . ogm /blob/master/neo4j/src/main/java/org/hibernate/ogm/ . datastore /neo4j/impl/BaseNeo4jSchemaDefiner . java#L189 * UniqueConstraintTest: https://github mongodb . com/hibernate/hibernate-ogm/blob/master/neo4j/src/ test /java/org/hibernate/ogm/datastore/neo4j/test/mapping/UniqueConstraintTest . java index
This issue involves embedded, http and bolt MongoDB indexes are more advance than the Neo4j
ones. We need to check which use cases work with Neo4j and update the tests accordingly. |
|