[appfuse-user] Authentication Structure Question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[appfuse-user] Authentication Structure Question

rafanami
Hi folks
I'm trying to extend my appfuse authentication, adding stuff like different roles(like Director, Seller, Client). But I have three main problems to do that:
1 - These classes must extend the User class
2 - The client class must be extended in two different classes - Customer and Company, because there are clients that are companies and clients that are people.
3 - How can I manage inheritance in Hibernate3?

Does anybody experienced something like this?

Thanks in advance

Rafael Mauricio Nami
Reply | Threaded
Open this post in threaded view
|

Re: [appfuse-user] Authentication Structure Question

Benoit-3
it's easy to mange inheritance :

xdoclet tags in parent class :

* @hibernate.class table="parent"

as usual...



xdoclet tags in child class :

* @hibernate.joined-subclass table="child"
 * @hibernate.joined-subclass-key column="id"
 * @struts.form name="childForm" include-all="true" extends="ParentForm"
indexedProperties="true"


this mapping create one table for each child.

look the hibernate doc, there's a special chapter on inheritance mapping
with different strategies.


Rafael Nami wrote:

> Hi folks
> I'm trying to extend my appfuse authentication, adding stuff like
> different roles(like Director, Seller, Client). But I have three main
> problems to do that:
> 1 - These classes must extend the User class
> 2 - The client class must be extended in two different classes -
> Customer and Company, because there are clients that are companies and
> clients that are people.
> 3 - How can I manage inheritance in Hibernate3?
>
> Does anybody experienced something like this?
>
> Thanks in advance
>
> Rafael Mauricio Nami



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [appfuse-user] Authentication Structure Question

rafanami
Thanks Benoit, you solve ONE of my problems. My doubt now is in what did I have to do with ACEGI to work with parent relationship with User.

Best Regards

Rafael Mauricio Nami

On 7/26/05, Benoit MORAILLON <[hidden email]> wrote:
it's easy to mange inheritance :

xdoclet tags in parent class :

* @hibernate.class table="parent"

as usual...



xdoclet tags in child class :

* @hibernate.joined-subclass table="child"
* @hibernate.joined-subclass-key column="id"
* @struts.form name="childForm" include-all="true" extends="ParentForm"
indexedProperties="true"


this mapping create one table for each child.

look the hibernate doc, there's a special chapter on inheritance mapping
with different strategies.


Rafael Nami wrote:

> Hi folks
> I'm trying to extend my appfuse authentication, adding stuff like
> different roles(like Director, Seller, Client). But I have three main
> problems to do that:
> 1 - These classes must extend the User class
> 2 - The client class must be extended in two different classes -
> Customer and Company, because there are clients that are companies and
> clients that are people.
> 3 - How can I manage inheritance in Hibernate3?
>
> Does anybody experienced something like this?
>
> Thanks in advance
>
> Rafael Mauricio Nami



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: [appfuse-user] Authentication Structure Question

Sergey Pariev-2
In reply to this post by rafanami
Hi, Rafael.

I'm not sure but it looks like it would be useful to you to browse the
following thread :
https://appfuse.dev.java.net/servlets/BrowseList?list=users&by=thread&from=225858

HTH, Sergey.


Rafael Nami ?????:

> Hi folks
> I'm trying to extend my appfuse authentication, adding stuff like
> different roles(like Director, Seller, Client). But I have three main
> problems to do that:
> 1 - These classes must extend the User class
> 2 - The client class must be extended in two different classes -
> Customer and Company, because there are clients that are companies and
> clients that are people.
> 3 - How can I manage inheritance in Hibernate3?
>
> Does anybody experienced something like this?
>
> Thanks in advance
>
> Rafael Mauricio Nami

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]