Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fe7ec9b1
authored
Mar 12, 2010
by
Juho Juopperi
Committed by
Juho Juopperi
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
role inheritance
1 parent
622427e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Role.java
View file @
fe7ec9b
...
@@ -43,12 +43,12 @@ public class Role implements ModelInterface {
...
@@ -43,12 +43,12 @@ public class Role implements ModelInterface {
@Column
(
name
=
"role_name"
,
nullable
=
false
)
@Column
(
name
=
"role_name"
,
nullable
=
false
)
private
String
name
;
private
String
name
;
@JoinTable
(
name
=
"role_memberships"
)
@ManyToMany
(
cascade
=
CascadeType
.
ALL
)
@ManyToMany
(
cascade
=
CascadeType
.
ALL
)
@JoinTable
(
name
=
"role_memberships"
,
joinColumns
=
@JoinColumn
(
name
=
"roles_id"
,
referencedColumnName
=
"roles_id"
),
inverseJoinColumns
=
@JoinColumn
(
name
=
"users_id"
,
referencedColumnName
=
"users_id"
))
private
List
<
User
>
users
;
private
List
<
User
>
users
;
@ManyToMany
@ManyToMany
@JoinTable
(
name
=
"role_
inheritance"
)
@JoinTable
(
name
=
"role_
parents"
,
joinColumns
=
@JoinColumn
(
name
=
"parent"
,
referencedColumnName
=
"roles_id"
),
inverseJoinColumns
=
@JoinColumn
(
name
=
"roles_id"
,
referencedColumnName
=
"roles_id"
)
)
private
List
<
Role
>
children
;
private
List
<
Role
>
children
;
@ManyToMany
(
mappedBy
=
"children"
)
@ManyToMany
(
mappedBy
=
"children"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment