I mean add, delete (not edit) and check existence.

Best Regards,
Gaurav


On Thu, Mar 27, 2014 at 4:34 PM, Gaurav Dhiman <[email protected]> wrote:

> How to add, edit and check an existence of LINK in LINKSET ?
>
> Considering below case for *document based database*, can some on give me
> code example for add, edit and check existence cases.
>
> Lets say
>
> company.employees is LINKSET (array of links to employee objects)
> employee.company is LINK (reverse link to company object)
>
> While adding employee, I need to do two way linking (company to employee
> and employee to company), how to do it ?
>
> var emp = db.getInstance("employee");
> emp.field("name", "John");
> emp.field("age", "35");
> emp.filed("company", "#2:4");     // Linked from employee to company
> company.field("employees", ?????);   // How to create link from company to
> employee ?
>
> Regards,
> Gaurav
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "OrientDB" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/orient-database/cvYD7oqwkCQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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