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.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?
Also, the PK value is not generated into the object (According to my
debugger at least).
I'll go redesign my database better (The Right Answer) but if this is
an issue it might be a good fix for a future release, assuming its a
bug and I am understanding correctly.
John
This archive was generated by hypermail 2.0.0 : Sun Aug 17 2008 - 05:38:37 EDT