What's the exception/error/problem?

Lvc@



On 25 June 2014 08:39, CNM <[email protected]> wrote:

> I have Employee and Project classes and need to have a link list of
> projects in the employee. I can't seem to get the link list to work. What
> am i doing wrong below?
> class Employee{
>    List<Project> projects;
>    ...
> }
>
> When I create a new instance of an employee, projects and add the projects
> into the above field
> Employee emp = db.newInstance(Employee.class);
> //set emp properties
> db.save(emp);
>
>
> Project proj1 = db.newInstance(Project.class);
> //set project properties
> db.save(proj1);
> emp.setProjects(new ArrayList<Project>());
> emp.getProjects().add(proj1);
>
> db.save(emp);
>
>
>  --
>
> ---
> 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.
>

-- 

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