Yes that works, but i was wondering if the save operation takes care of
links as it would have been very convenient when dealing with multiple LINK
fields and when you cant always guarantee their existence.
For example if Employee had a Country link too, and if it is not always
guaranteed that UI will send me the Country object attached to Employee i
will have to dynamically generate the query to handle it.
This db.save() already handles this for general fields but not for links.
Was wondering if there could be an improvement around this.
On Friday, July 24, 2015 at 4:03:14 PM UTC+5:30, SavioL wrote:
>
> try this changes:
>
> 1) in the class Employee, change the departement property as: LINKSET
>
> 2) in your function javascript, delete "db.save(employee);" and add
> "g.command( "sql", " insert into Employee(name,department) values
> ('John2',[#2:33]) ");"
>
>
>
> *example:var g= orient.getGraph(); var employee = {'@class': 'Employee',
> name: 'John', department: {'@class': 'Department', '@rid':
> '#2:33'}};g.command( "sql", " insert into Employee(name,department) values
> ('John2',[#2:33]) ");*
>
> it should work...
>
> regards,
> Savio L.
>
>
>
>
--
---
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.