arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

mandatory property check fail with Cypher

Open ExtReMLapin opened this issue 9 months ago • 2 comments

Hello,

Creating a property with mandatory fails to correctly detect the property is used in cypher.

sample database

GSDFGDG.zip

Query to execute :

CREATE (p:EMBEDDING {vector: [-0.00931549072265625, 0.032073974609375, -0.005565643310546875, -0.01354217529296875]})
  

Error :

Cannot execute command The property 'EMBEDDING.vector' is mandatory, but not found on record: @EMBEDDING[]


INSERT INTO EMBEDDING SET vector = [-0.00931549072265625, 0.032073974609375, -0.005565643310546875, -0.01354217529296875]

Works fine

ExtReMLapin avatar Feb 28 '25 13:02 ExtReMLapin

In validateField method, in cypher document.map is empty, not with SQL.

ExtReMLapin avatar Feb 28 '25 13:02 ExtReMLapin

I think with cypher the insert is a 2 step process, first it inserts the record empty, then updates the properties.

lvca avatar Mar 03 '25 16:03 lvca

Unfortunately Cypher uses a 2 step process that fails on creation because empty. We can't fix this behavior in the cypher module, the only way is to disable the mandatory constraint or create the vertices using SQL or API.

lvca avatar Sep 09 '25 05:09 lvca