Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 082B57ADC for ; Thu, 25 Aug 2011 15:14:32 +0000 (UTC) Received: (qmail 96621 invoked by uid 500); 25 Aug 2011 15:14:31 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 96555 invoked by uid 500); 25 Aug 2011 15:14:30 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 96547 invoked by uid 99); 25 Aug 2011 15:14:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2011 15:14:30 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of joelbecker0@gmail.com designates 209.85.215.43 as permitted sender) Received: from [209.85.215.43] (HELO mail-ew0-f43.google.com) (209.85.215.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2011 15:14:23 +0000 Received: by ewy20 with SMTP id 20so1558338ewy.16 for ; Thu, 25 Aug 2011 08:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=c0h3OcDtoKRoChZLzO1RWf+WMyS+aKqUVK6D68u17xw=; b=aVJFRenCbo0bVQBgMqvUueZHo+EJzbue9MRxIN066Gbr4KvFg/QLt+TFLWkUnCHc9R cu2O54E+IZyZ2kypJNoj5d+g7Wi/UnDibH02GMCOj3lQ2xGigLvRHWtJWSWfd5FeFtK5 sZZ/korTCAn1xbt2UFiU0WZ0n7MzrLF/WQQMw= MIME-Version: 1.0 Received: by 10.213.4.197 with SMTP id 5mr1117396ebs.126.1314285243352; Thu, 25 Aug 2011 08:14:03 -0700 (PDT) Received: by 10.213.35.196 with HTTP; Thu, 25 Aug 2011 08:14:03 -0700 (PDT) In-Reply-To: <606EFE10-C88D-4417-98C3-5C25B563DD5C@objectstyle.org> References: <606EFE10-C88D-4417-98C3-5C25B563DD5C@objectstyle.org> Date: Thu, 25 Aug 2011 10:14:03 -0500 Message-ID: Subject: Re: cgen bug - unexpanded template variables From: Joel Becker To: user@cayenne.apache.org Content-Type: multipart/alternative; boundary=0015174c33ee10483404ab55e17e X-Virus-Checked: Checked by ClamAV on apache.org --0015174c33ee10483404ab55e17e Content-Type: text/plain; charset=ISO-8859-1 No errors when generating from the Modeller! So the bug is only between the modeller mapping file and the maven cgen plugin. It's less convenient this way since it can't just be part of the build, but at least it works. Should i file a jira ticket? On Wed, Aug 24, 2011 at 3:42 PM, Andrus Adamchik wrote: > One final try - if you generate the classes from the Modeler "Tools > > Generate Classes" is it resulting in the same problem? > > On Aug 24, 2011, at 6:47 PM, Joel Becker wrote: > > > (I had to re-subscribe with a different e-mail because of filtering) > > > > I'm using Cayanne Modeller 3.0.2 and the 3.0.2 maven plug-ings. > > > > I did have some warnings in the schema (some tables lacked a pk), but > > after fixing them, saving, and re-generating, I get the same errors. > > > > > > I am sure I've seen it before. IIRC certain errors in the DataMap caused > > similar behavior for > > me. So which version of Cayenne is this and also are there any warnings > when > > you save your > > project in the Modeler? > > (If we can't come with an answer based on this info, I guess you may open > a > > Jira and attach > > the problematic DataMap to it so that somebody could debug it, and at > least > > improve the Modeler > > validation - https://issues.apache.org/jira/browse/CAY ). > > Cheers, > > Andrus > > On Aug 24, 2011, at 5:11 PM, Becker, Joel wrote: > >> Hello everyone. I reverse-engineered an existing database in Cayenne > >> modeler -worked very smoothly-then I created a maven project and ran the > >> cgen plugin on the resulting mapping files (there are 2, one for each of > >> 2 data nodes / schemas). The first worked fine. For the second, in the > >> generated java POJOs, about half or more of the addTo*Array() and > >> removeFrom*Array() methods have for a parameter > >> "$importUtils.formatJavaType(${rel.TargetEntity.ClassName}) obj", which > >> obviously results in compiler errors. This looks like an unexpanded > >> variable from the code templates, like maybe it's not being set? Is this > >> a known bug? Is there a work-around? > >> > >> > >> > >> Thanks! > >> > >> Joel > >> > >> > >> > > --0015174c33ee10483404ab55e17e--