title: gorm save method causing a select query to fire
body: <p>I am using grails 1.3.7 and zkoss and my domain model is as below, I load the Person entity in session 1 and make changes to it through the UI.</p>
  
  <p>The on press of save in session 2 I want to save the entity.</p>
  
  <p>So from my composer/controller I call a service method(transactional) and then do person.save(), When i see the sql queries being fired I see a query which tries to retrieve the employee object.</p>
  
  <p>After which the save is fired and throws a nonuniqueobjectexception
  Exception</p>
  
  <blockquote>
    <blockquote>
      <p>org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.nthdimenzion.domain.Employee#2]</p>
    </blockquote>
  </blockquote>
  
  <p>Query</p>
  
  <pre><code>Hibernate: select this_.id as id7_0_, this_.version as version7_0_, this_.emp_id as emp4_7_0_, this_.person_id as person5_7_0_ from person_role this_ where this_.class='com.nthdimenzion.domain.Employee' and this_.emp_id=?
  
  class PersonService {
  static transactional = true
  def savePerson(Person person) {
      person = person.save();
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>class Person extends Party{
  
  String firstName;
  String middleName;  
  static hasMany = [ personRoles : PersonRole ] -- lazy loaded
  </code></pre>
  
  <p>....
  }</p>
  
  <pre><code>class PersonRole {
  public static enum ROLETYPES{
      EMPLOYEE,AUTHOR
  };
  public boolean hasRoleType (ROLETYPES roleType){
      return false;
  }
  static transients = ['ROLETYPES']
  static constraints = {
  }
   }
  
  
  
  class Employee extends PersonRole{
  def empRoleType = [ROLETYPES.EMPLOYEE]
  String empId
      static belongsTo = [person:Person]
   static transients = ['empRoleType', 'uid']
  static constraints = {
      books(nullable:true)
      empId(unique:true)
  }
  static hasMany = [books:Book]
  static mapping = { books cascade:"all" }
  static belongsTo = [person:Person]
    ......
  }
  </code></pre>
  
  <p>Is this behavior correct ?</p>