2017-09-25 5 views
0

Je souhaite créer une arête à l'aide d'une sous-requête pour définir une propriété. Ce qui suit est la requête que je utilise:OrientDB Création d'une arête à l'aide de l'instruction select pour définir la propriété

create edge HAS from #57:0 to #80:3 set Type = (select from A where ID = 1) 

Cela me donne l'erreur suivante:

OvalidationException: 
The field 'HAS.Type' has been declared as LINK but the 
value is not a record or a record-id 

S'il vous plaît noter le type est une propriété de type LINK. Toute aide est appréciée merci!

Répondre

0

Voici la réponse:

create edge HAS from #57:0 to #80:3 set Type = first((select from A where ID = 1))