-
Notifications
You must be signed in to change notification settings - Fork 619
Description
After upgrading from SDN 7.4.5 to 7.5.4 I began getting this error when calling Neo4jOperations.saveAs():
org.springframework.dao.InvalidDataAccessResourceUsageException: Failed to invoke procedure db.create.setNodeVectorProperty: Caused by: java.lang.IllegalArgumentException: 'vector' must be a non-null numerical array; Error code 'Neo.ClientError.Procedure.ProcedureCallFailed'
I found it odd because there are no Vector properties on any of my entity classes. I turned up tracing and found the cypher query being produced in v7.4.5 is different than v7.5.4. Version 7.5.4 is treating the “id” property as a Vector.
-- v7.4.5 --
OPTIONAL MATCH (hlp:Claim) WHERE hlp.id = $id WITH hlp WHERE hlp IS NULL CREATE (claim:Claim {version: 0}) WITH claim SET claim += $properties SET claim:Active_Claim RETURN claim UNION MATCH (claim:Claim) WHERE (claim.id = $id AND claim.version = $version) SET claim.version = (claim.version + 1) WITH claim WHERE claim.version = (coalesce($version, 0) + 1) SET claim += $properties SET claim:Active_Claim RETURN claim
:param id => "60000000001"
:param version => null
:param properties => {…}
-- v7.5.4 --
OPTIONAL MATCH (hlp:Claim) WHERE hlp.id = $id WITH hlp WHERE hlp IS NULL CREATE (claim:Claim {version: 0}) WITH claim SET claim += $properties SET claim:Active_Claim WITH claim CALL db.create.setNodeVectorProperty(claim, $vectorProperty, $vectorValue) RETURN claim UNION MATCH (claim:Claim) WHERE (claim.id = $id AND claim.version = $version) SET claim.version = (claim.version + 1) WITH claim WHERE claim.version = (coalesce($version, 0) + 1) SET claim += $properties SET claim:Active_Claim WITH claim CALL db.create.setNodeVectorProperty(claim, $vectorProperty, $vectorValue) RETURN claim
:param id => "60000000001"
:param vectorProperty => 'id'
:param version => null
:param vectorValue => "60000000001"
:param properties => {…}
After some debugging, I located this method which determines if a property is a Vector:
Line 76 in fc8aefc
| default boolean isVectorProperty() { |
Line 77 in fc8aefc
| return this.getType().isAssignableFrom(Vector.class); |
return Vector.class.isAssignableFrom(this.getClass()); ?
Thanks!