Hi, Richard,

I'm new here and not really familiar with Appfuse, but it is easy to see
that your question has almost no relationship with Appfuse. It's not
strange that no one can answer you in short. Actually, I think that your
problem should be a general Domain Design problem, and the
implementation greatly depends on your knowledge about Hibernate. Maybe
you can read some book on those for more help.
I'm not good at this, but in my opinion, I think you don't need to make
things that complex. You can just define an object: User, and map to
USERS table. And all types of users, such as Teacher, Student, they
should be modeled as different roles. This is a USER-ROLE many to many
model. That is to say, for User class, it contains a roles set, and for
the Role class, it contains a users set. User class will map to USERS
table, and Role class will map to ROLES table,  to link them together,
you have another USER_ROLE table contains two columns: user_id, role_id.
This table will not map to any class in Hibernate, just used to
represent the many to many relationship between user and roles.

Actually this is a general part of the RBAC access control model, if you
have any idea of ACEGI (appfuse2 also used this), you should be quite
familiar with this. Hope this can give some help.

Regards,

David Dun
Richard Nduka wrote:
> Alrite. Thanks
>
> On 10/9/07, *Matt Raible* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     If you haven't gotten a response, it's likely that no one knows the
>     answer to your question.
>
>     Matt
>
>     On 10/9/07, Richard Nduka <[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>> wrote:
>     >
>     >
>     > Any Help with the below problem???
>     >
>     >
>     >
>     > > Hi Folks,
>     > >
>     > > I have a little problem. Basically this is my problem:
>     > >
>     > > My application requires an object model that includes a
>     parent, teacher,
>     > student and of course each of this type of persons would be able
>     to logon to
>     > the application. So i have basically abstracted all the common
>     stuffs like
>     > name, title, email, address to an object called person which would
>     > correspond to a person table. Then i would have objects parent,
>     teacher,
>     > student each which would be types of persons and would have a
>     person_id
>     > identifier in addition to their own tables. The User object
>     would basically
>     > have just username, password, and the role details and every
>     person would
>     > have a user object. I really do not know if am doing it right. i am
>     > wondering how to capture a scenerio when a teacher is also a
>     parent.
>     > >
>     > > Please anyone has any idea on how i can model this and also
>     represent in
>     > hibernate xdoclet mapping. I am using appfuse 1.9.4, jdk 1.5,
>     mysql 5.
>     > >
>     > > Thanks in advance.
>     > >
>     > >
>     >
>     >
>
>
>     --
>     http://raibledesigns.com
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>     For additional commands, e-mail: [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to