I agree on the project.xml idea...makes a lot of sense. Okay, on additionalMaps I was trying this yesterday and couldn't get it to work. I've provided the directory to where my datamap files are stored and I see that it fails (although I don't have any detail...not sure how to see that in m2e). I've tried the full path, trailing slashes, no trailing slashes, etc.
I'm probably being dense...but just not sure how. :D -Lon On Tue, Oct 28, 2014 at 11:19 PM, Andrus Adamchik <[email protected]> wrote: > 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 > >
