Re: tapestry-acegi example app question (solved)

2008-03-11 Thread Robin Helgelin
On Tue, Mar 11, 2008 at 3:37 AM, Julian Wood <[EMAIL PROTECTED]> wrote: > Hate to answer my own question, but I think the proper relation for: > > is: > > @ManyToMany( cascade={CascadeType.PERSIST, CascadeType.MERGE} ) > > You then need to persist your GrantedAuthorityBean independently from >

Re: tapestry-acegi example app question

2008-03-11 Thread Robin Helgelin
On Tue, Mar 11, 2008 at 12:18 AM, Julian Wood <[EMAIL PROTECTED]> wrote: > In the provided example for tapestry-acegi, I have a question about > the GrantedAuthorityBean table. That is, if I add more users which > share roles, each role will create a new row in the GAB table. How can > this be a

Re: tapestry-acegi example app question (solved)

2008-03-10 Thread Julian Wood
Hate to answer my own question, but I think the proper relation for: @OneToMany @Cascade(CascadeType.ALL) public Collection getGrantedAuthorities() { return grantedAuthorities; } is: @ManyToMany( cascade={CascadeType.PERSIST, CascadeType.MERGE} ) You then need to persist your GrantedA

tapestry-acegi example app question

2008-03-10 Thread Julian Wood
In the provided example for tapestry-acegi, I have a question about the GrantedAuthorityBean table. That is, if I add more users which share roles, each role will create a new row in the GAB table. How can this be avoided? I've tried making the authority unique: @Table(uniqueConstraints =