Hello,

I am trying to write a Javascript Server Function to save a nested object 
which is directly coming from my UI.

my example is that I have Department record which already exists in DB and 
i am creating a new Employee record while linking to this existing 
Department record. 

var employee = {'@class': 'Employee', name: 'John', department: {'@class': 
'Department', '@rid': '#2:33'}};
db.save(employee);

when i do this i get following error.
The field 'Employee.department' has been declared as LINK but the value is 
not a record or a record-id [ONetworkProtocolHttpDb]

Is it possible to get this working without having to query the department 
object separately and injecting it to this object?

I am using orientdb-community-2.0.3

Appreciate your response. 

Thanks.
Chandima

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to