I'm developping a program that uses the neo4j-ogm library directly (aka I don't use any Spring component) and my Neo4J DB has this sorts of relations:
PARAMETER<-[:HAS_PARAMETER]-TASK-[:HAS_STEP]->STEP-[:HAS_PARAMETER]->PARAMETER
STEP-[:HAS_STEP]->STEP
PARAMETER-[:INITIALIZES]->PARAMETER
I coded all my domain classes (PARAMETER, TASK and STEP).
I write a query like (with a session.query method call):
MATCH (:TASK)-[r*]->() return r
Can I directly map the result from my query to domain objects?
EDIT: To be sharper, I've got this class Task
@NodeEntity
class Task {
@RelationShip(type = "HAS_STEP")
Set<Step> steps;
@RelationShip(type = "HAS_PARAMETER")
Set<Parameter> parameters;
}
I wish fill a Task instance (with steps and parameters) and each step be filled too.