cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: PK ID retrieval code generation seems to fail
Date Mon, 18 Aug 2008 16:19:01 GMT
Which version of Cayenne is this? I vaguely recall a bug that we fixed  
already...

Andrus


On Aug 18, 2008, at 7:16 PM, John Armstrong wrote:

> Hi Ari,
>  I am only using the model tool as specified in the wiki
> (http://cwiki.apache.org/CAY/mapping-primary-keys.html), no custom
> templates or anything 'advanced'. Should I file a ticket for tracking
> or is this user error on my side?
>
> John-
>
> On Sun, Aug 17, 2008 at 7:23 AM, Aristedes Maniatis <ari@ish.com.au>  
> wrote:
>>
>> On 17/08/2008, at 7:38 PM, John Armstrong wrote:
>>
>>>  public $classGen.formatJavaType(${attr.Type}) getId() {
>>>      Object value = readProperty("id");
>>>      return (value != null) ? (Integer) value : 0;
>>>  }
>>>
>>> The getId() doesn't compile as it looks like something is not
>>> interpolating cleanly during class generation?
>>
>> It looks like the templates are not being properly processed. I  
>> can't image
>> why, but are you using cgen as described here:
>> http://cayenne.apache.org/doc/cgen.html to create these files? If  
>> you have
>> customised your templates could you try with the default ones.
>>
>> Ari Maniatis
>>
>>
>>
>> -------------------------->
>> ish
>> http://www.ish.com.au
>> Level 1, 30 Wilson Street Newtown 2042 Australia
>> phone +61 2 9550 5001   fax +61 2 9550 4001
>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>>
>>
>>
>


Mime
View raw message