Hi Derek, On 10 Sep 2007 at 12:30, Derek Broughton wrote:
> Michael Horwitz wrote: > > > For AppFuse 2.0.X the easiest approach is simply to include the code for > > the User class and modify as required: > > http://www.appfuse.org/display/APF/AppFuse+Core+Classes > > > > > > On 9/7/07, Rob Hills > > <[EMAIL PROTECTED]> wrote: > >> > >> I need to add a single attribute to the user class and was wondering what > >> was the "recommended" way to go about this. > >> > >> I had thought to extend org.appfuse.model.User adding my own attributes, > >> getters and setters, but had concerns about a couple of things: > >> > > Mike, I'm sure it's the _easiest_ way, but it doesn't seem like the _best_ > way. It's not the "Java" way. This was my thinking when I first started down this track. > Isn't extension possible? Should it be? Probably. Is it? Not without modifying AppFuse if you want to use some of the nice automatic code generation stuff. From my reading, to be able to extend the User class and still have the Hibernate-based auto-generate stuff, the User class would have to be marked with the @MappedSuperClass annotation. That seems easy enough to do, but I'd be surprised if that was the only change that would be required. Unfortunately, I don't have the time right now to experiment with it so I've just taken the easy route and copied the original AppFuse User class and its model and action mates. Cheers, Rob Hills Waikiki, Western Australia Mobile +61 (412) 904-357 Fax: +61 (8) 9529-2137 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
