Try using "additionalMaps" parameter: http://cayenne.apache.org/docs/3.1/cayenne-guide/including-cayenne-in-project.html#maven-projects
"additionalMaps [...] A directory that contains additional DataMap XML files that may be needed to resolve cross-DataMap relationships for the the main DataMap, for which class generation occurs." On a side note, I don't recall why we initially went with per-DataMap instead of per-project "cgen", but now I feel like cgen should read cayenne-project.xml and discover all this information on its own. Until we change this approach, "additionalMaps" should help. HTH, Andrus > On Oct 29, 2014, at 2:59 AM, Lon Varscsak <[email protected]> wrote: > > There appears to be an issue either with class generation or something with > my model. > > Whenever I have a relationship that crosses datanodes the TargetEntity is > null. So I get things like in the Java class: > > public static final Property<$importUtils.formatJavaType(${rel.TargetEntity. > ClassName})> COMPANY = new Property<$importUtils.formatJavaType(${rel > .TargetEntity.ClassName})>("company"); > > If the entity is with the same datanode I don't have an issue (same line in > the velocity template). > > Any ideas? > > Thanks, > > Lon
