I'm trying to create a new node that is linked to an existing node for which I have the elementId. I wrote this query in the Neo4J browser to verify what I wanted to do actually worked:
MATCH (newApp: systemββapplication
) WHERE elementId(newApp) = '4:c27fa6be-0d0f-4662-9e30-b4e7302b9104:1'
CREATE (newApp) -[:RecordType]-> (newRecordType: systemββrecordType
{spaceName: 'Test', recordType:'StringTest'})
RETURN elementId(newRecordType)
With a result of:
ββββββββββββββββββββββββββββββββββββββββββββ
βelementId(newRecordType) β
ββββββββββββββββββββββββββββββββββββββββββββ‘
β"4:c27fa6be-0d0f-4662-9e30-b4e7302b9104:2"β
ββββββββββββββββββββββββββββββββββββββββββββ
Then I wrote the code to create the equivalent of the same query for running with the Java driver:
MATCH (newApp: systemββapplication
) WHERE elementId(newApp) = '4:24d5928d-24a7-401f-bf3f-7ff4fb7766dd:47'
CREATE (newApp) -[:RecordType]-> (newRecordType: systemββrecordType
$props)
RETURN elementId(newRecordType)
Where the query properties are: {props={spaceName=Test, recordType=StringTest}}
With a result of:
+--------------------------+
| elementId(newRecordType) |
+--------------------------+
+--------------------------+
0 row
So clearly, I'm doing something wrong here, but I just don't see it. I would greatly appreciate any feedback or suggestions that anyone might have to offer here.
Thank you