title: User Role Relation lost in Grails Spring Security Application
body: <p>I'm facing a weird issue in my grails 2.5.5 application with spring-security-core:2.0-RC6 and spring-security-oauth2-provider:2.0-RC5. Recently, an admin user lost his role and he wasn't able to login to the system. I tried to debug my application but wasn't able to find the reason for this. </p>
  
  <p>Here is my UserRole domain class:</p>
  
  <pre><code>SysUser user
  Role role
  </code></pre>
  
  <p>With a regular user class generated from spring security. We faced this issue also with User Location relationship. It is many to many relationship and suddenly this relation get discarded between random users and locations. </p>
  
  <pre><code>Location
  static hasMany = [locEmployees: User]
  Collection locEmployees=[]
  </code></pre>
  
  <p>and the User class</p>
  
  <pre><code>static hasMany =[locations:Location]
  static belongsTo = Location
  </code></pre>
  
  <p>Has anyone faced this type of issues? Any ideas how can I solve it?</p>