Ups, Actually i forgot to say: a teacher is ALSO a student!!
I've invented teacher-students names on the fly for a better
explanation!
So every teacher somewhere in the webapp can act as a students.
On Jan 30, 12:32 pm, Thiago Belem wrote:
> This shoud work too:
>
> User $belongsTo Group
> User
This shoud work too:
User $belongsTo Group
User $hasOne Teacher (1:1)
User $hasOne Student (1:1)
A user don't have multiple (belongsTo/hasMany) students or teachers, he IS
the teacher OR the student... so hasOne should do the trick.
Cya,
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Br
Hi everybody!
I want to know if i'm doing things right, please!
I have 3 kind of users: admin,teacher,students, so i've created 3
different groups (for ACL).
For the users, I've made 3 separated tables: users (for login),
teachers, and students.
So:
Users $belongsTo Group
teachers $belongsTo User