On Jan 16, 2008, at 6:53 PM, Michael Gentry wrote:
> I was thinking updating the enum code to check for a custom/advanced
> cayenne enum in addition to the current enum support. That way you
> could support basic enums (the current approach) or more advanced
> enums, where you need to control the values stored in the database.
So I guess my question was - can we make it a generic "map" of sorts
to avoid a "Cayenne Enum"? I'd rather we use some naming convention or
an annotation on an arbitrary enum than introducing another special
mapping primitive in Cayenne. Maybe we should start playing with
annotations finally... E.g.:
public enum SomeArbitraryType {
TYPE1, TYPE2, ...;
..numCode
public String getCode() {
// this is dumb, but demonstrates the idea
return name() + "_CODE";
}
}
What do you think?
Andrus
This archive was generated by hypermail 2.0.0 : Wed Jan 16 2008 - 12:35:17 EST