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

Mike


On 9/7/07, Rob Hills <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> 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:
>
> 1.      What hibernate annotations do I use.  For example, if I add
> Entity(name="app_user"), does Hibernate happily accept that and create
> one table based on the last class in the inheritance chain?
>
> 2.      Do I have to do anything to ensure Acegi security still works?  I
> haven't been able to find yet where Acegi security is plugged into the
> app_user table (or the org.appfuse.model.User or any related class) but
> I'm
> guessing it would still be able to happily work via that class anyway, is
> that
> correct?
>
> The other alternative I thought of would be to create my own independent
> user class with its own DB table and create a one-to-one relationship
> between the two, but as I only need to add a single attribute to the
> class, that
> would seem to be a bit of overkill.  I suspect that would also complicate
> user
> management forms.
>
> I'd value people's thoughts on this.  I'm also happy to summarise the
> results
> of any discussion as an FAQ if people think that's worthwhile.
>
> 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]
>
>

Reply via email to