apache-cayenne

How to create a relationship to an ObjEntity in another DataMap?


Somewhere i read, that it's possible with Cayenne to have relationships connecting entities from two different DataMaps, just like WebObjects EOModeler. I am not able to create such relationship in Cayenne Modeler 4.0RC1 and 4.1M2 - the target entity dropdown lists only entities from the current map. Any hints?

See screenshot Apache CayenneModeler


Solution

  • You can create DbRelationship first and use it. In this case you can choose any DbEntity in any DataMap. See this tutorial for details.