Hi all,
I have a database with following model ( I had simplified to my question only):
Table: Contacts ( simply contacts )
id (pk)
Name
...
readID (fk on ACL(id))
writeID (fk on ACL(id))
userID (fk on USERS(id))
Table: ACL ( Access Control List (ACL) Permission )
permID (fk on Perms(id))
userID (fk on Users(id))
groupID (fk on Groups(id))
Table: Users ( users table )
userID (pk)
name
...
Table: Groups ( users group )
groupID (PK)
name
...
Table: UsersGroups
userID (fk on Users(id))
groupID (fk on Groups(id))
...
Table: CTGroups ( Contacts Group )
groupID (pk)
...
Table: CNTGroups ( contacts on groups )
contactID (fk on Contacts(ID))
groupID (fk on CTGroup(CTGroup))
My questions:
1) It's possible to use hibernate with this database model ? Or better, it's hibernate a good framework
for this model ?
2) How can I map hibernate if I pretend to obtain things like:
* All contacts that user XPTO could read (readID)
* All contacts in group employee, that user XPTO have read or write access
3) where can I get good examples ?
Notes: I have read Hibernate in Action, but I don't know why didn't refer to permission system,
because for me it's a usual to use.
Thanks,
Paulo
|