Cayenne handles Java 5 enums automatically? You don't have to have, in your custom type (the enum), setJdbcObject or materializeObject and don't have to register the enum with Cayenne? I admit I haven't tried Java 5 enums with Cayenne yet (the code I have here is locked into Java 1.4 at the moment).
If this is the case, then it wouldn't make a lot of sense to add it to the modeler. Thanks, /dev/mrg On 8/9/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > > On Aug 9, 2007, at 4:12 PM, Michael Gentry wrote: > > > Yes, that is currently how I've done it -- although with Java 1.4 and > > my own enumeration stuff. I have to manually register my enums with > > Cayenne on startup. (Typing in the enumerated value in the modeler > > doesn't auto-initialize them and make them available -- they have to > > be individually registered with the DataNode -- > > node.getAdapter().getExtendedTypes().registerType(...).) > > With native Java 5 enums, this is automatic. I understand there's no > plan to support your custom enums going forward? Java built-in enums > should be enough, right? > > > > I'd like another section in the modeler where you define enumerated > > values, just as you define classes. > > But why? An enum is a Java class (sort of). Other than the class > name, Cayenne doesn't need to know anything about it. So such mapping > seems redundant. > > Andrus > >
