I'm using neo4j as my database in my little application. My application is about managing candidates' CV (Resume').
This is my diagram :
For now, what I'm doing is to add a project with a list of skills that the project uses.
This is my neo4j query:
MATCH (user: User)
WHERE (user.Id = "74994fd8-40bb-48e8-adf1-bc11eeb6c035")
WITH user
MERGE (project: Project {Id: '02d5ad72-036c-47e9-a366-d5ca4a3e66e2'})
ON CREATE
SET project = {
Id: "02d5ad72-036c-47e9-a366-d5ca4a3e66e2",
Name: "VINCI GTR",
Description: "Description of VINCI GTR",
StartedTime: 0.0
}
MERGE (user)-[:DID_PROJECT]->(project)
WITH project, user
MATCH (user)-[:HAS_SKILL]->(skill: Skill)
WHERE skill.Id IN []
MERGE (project)-[:USED_SKILL]->(skill)
RETURN project
In my query, I use: WHERE skill.Id IN [] to make sure my skills list is empty, because I want to simulate a situation that there is no skill available.
When I run the command, I cannot receive the newly created project, even it has been created in database. I have this result instead:
How can I:
- Create the relationships between user and skill when skill is available and -
- Skip this operation if no skill is not available.
- Return newly created
Projectinstance ?
Thanks

