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 = [EMAIL PROTECTED](columnNames = {"authority"})})

but hibernate is not clever enough to realize that it should reuse existing roles, and just throws a constraint exception. I'm looking at interceptors now. I guess this is really a hibernate question, but I thought that someone here might have encountered this issue, given its context in tapestry-hibernate.

Thanks,

J

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

Reply via email to