Skip to content

Nested object mapping for custom CYPHER query cut off since SDN 7.3.2 #2963

@ruempel

Description

@ruempel

We are heavily using custom CYPHER queries in CRUD repositories for performance reasons.

Since SDN 7.3.2, nested objects queried by relations are not mapped anymore. It worked until SDN 7.3.1.

If you use this custom query, the nested object is null now:

public interface MyRepository extends CrudRepository<MyModel, String> {

    @Query("""
            MATCH (root:MyModel {uuid: $uuid})
            RETURN root {
                     .*, MyModel_REL_TO_MY_NESTED_MODEL_MyModel: [
                       (root)-[:REL_TO_MY_NESTED_MODEL]->(nested:MyModel) | nested {. *}
                     ]
                   }
            """)
    Optional<MyModel> getByUuidCustomQuery(String uuid);
}

For your convenience, I prepared a minimum example Git repo with a test case, where you can try it out: https://github.com/planyverse/sdn-example

Metadata

Metadata

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions