Re: PK ID retrieval code generation seems to fail

2008-08-17 Thread Aristedes Maniatis
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 du

PK ID retrieval code generation seems to fail

2008-08-17 Thread John Armstrong
Using M4 I map my PK field (id) to an object field as per the wiki here : http://cwiki.apache.org/CAY/mapping-primary-keys.html In my generated class these two functions are added: public void setId(int id) { writeProperty("id", id); } public $classGen.formatJavaType(${attr.Ty