[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-dev
Subject:    cvs commit: db-torque/src/generator/src/templates/om ObjectWithManager.vm
From:       tfischer () apache ! org
Date:       2005-02-16 9:24:11
Message-ID: 20050216092411.77473.qmail () minotaur ! apache ! org
[Download RAW message or body]

tfischer    2005/02/16 01:24:11

  Modified:    src/generator/src/templates/om ObjectWithManager.vm
  Log:
  Fixed a problem that the Cache Manager misses saves. In Thomas Vandahl's words:
  In ObjectWithManager.vm there is a problem in the line
  
  #set ($tableHasPrimaryKey = $table.PrimaryKey.size() > 0)
  
  Velocity barfs on this statement ("rhs of #set statement is null")
  
  The generated save(Connection con) method misses the cache update call in this \
case.  The bug was introduced fairly recently in Rev 1.15 in an attempt to fix the \
generated code for tables without PKs. Torque 3.1.1 works fine.  
  PR: TRQS279
  Submitted by:	Thomas Vandahl
  
  Revision  Changes    Path
  1.17      +6 -1      db-torque/src/generator/src/templates/om/ObjectWithManager.vm
  
  Index: ObjectWithManager.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/om/ObjectWithManager.vm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ObjectWithManager.vm	31 Jan 2005 19:43:57 -0000	1.16
  +++ ObjectWithManager.vm	16 Feb 2005 09:24:11 -0000	1.17
  @@ -1107,7 +1107,12 @@
                       ${table.JavaName}Peer.doUpdate(($table.JavaName) this, con);
                   }
   
  -  #set ($tableHasPrimaryKey = $table.PrimaryKey.size() > 0)
  +  #if ($table.PrimaryKey.size() > 0)
  +    #set ($tableHasPrimaryKey = true)
  +  #else
  +    #set ($tableHasPrimaryKey = false)
  +  #end
  +
     #if ($tableHasPrimaryKey)
       #set ($interfaceName = $table.JavaName)
       #if ($table.Interface)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic