Hi,

I'm trying to find out how to model bidirectional relationships with Qi4j and came up with a few questions:

Consider the following entities (Pseudcode, more or less)

Person {
   Association<Company> company();
}

Company {
   ManyAssociation<Person> employees();
}

This could be two things:

1) A bidirectional relationship
2) Two unidirectional relationships

How do I tell Qi4j which it is?

To make the point a bit more obvious, let's extend the model:

Person {
   Association<Company> company();
}

Company {
   ManyAssociation<Person> employees();
   ManyAssociation<Person> owners();
}

Qi4j cannot know anything about the semantics so it has no way of knowing if company is the inverse of employees or owners. Is there a way to specify this via an annotation?

Thanks in advance,

Robert











_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to