Even if these lines are right, they are using undocumented velocity behavior -- I could find no reference to allowing multi-line #if statements nor allowing "and" and "or" as logical expressions in the velocity documents.
On Mon, Oct 12, 2015 at 12:51 PM, Andrus Adamchik <and...@objectstyle.org> wrote: > [taking to dev] > > @Savva : these were checked in on April 29th per CAY-1999. Could you please > check whether we need to make this change in the Cayenne code? (and perhaps > we can reproduce the issue with a unit test). > > Thanks, > Andrus > >> On Oct 12, 2015, at 12:33 PM, Mike Kienenberger <mkien...@gmail.com> wrote: >> >> I haven't had time to test this yet, but I'm pretty sure that lines 38 >> & 39 in the template are wrong. >> >> Dipesh, >> >> Go to >> https://github.com/apache/cayenne/blob/master/cayenne-tools/src/main/resources/templates/v1_2/superclass.vm >> in your checkout, and replace lines 38 and 39 with a single line 38 >> containing: >> >> #if((${object.DeclaredAttributes} && >> !${object.DeclaredAttributes.isEmpty()}) || >> (${object.DeclaredRelationships} && >> !${object.DeclaredRelationships.isEmpty()})) >