I'm new with Apache Cayenne.
I have only one Entity, called Product. This entity has a many-to-many relationship with itself, that is a product can contain products, and it can be contained by other products.
I can't model this relationship with Cayenne.. What I do is: 1) I create a table called Composition, with two fields that are both PKs and FKs. 2) I create two toMany from Product to Composition (one from product.id to Composition.contained_id, and one from product.id to Composition.base_id) This should work with the DB Now I create only one ObjEntity: Product. But.. How can I create a flattened relationship?? I'm following this: http://cayenne.apache.org/doc/cayennemodeler-flattened-relationships.html but maybe because it is a relationship with itself I cannot select an Entity in "Target" combo box..
Thank you Francesco
EDIT: the target checkbox problem there is also if the two entities are different. Cayenne Modeler v.3.0.2