You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by mp...@apache.org on 2004/01/22 01:55:06 UTC

cvs commit: db-torque/src/generator/src/templates/om ObjectWithManager.vm

mpoeschl    2004/01/21 16:55:06

  Modified:    src/generator/src/templates/om ObjectWithManager.vm
  Log:
  missing part for TRQS97
  
  Revision  Changes    Path
  1.9       +9 -2      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ObjectWithManager.vm	21 Jan 2004 23:05:57 -0000	1.8
  +++ ObjectWithManager.vm	22 Jan 2004 00:55:06 -0000	1.9
  @@ -1428,9 +1428,16 @@
     #foreach ($col in $table.Columns)
       #if ($col.isPrimaryKey())
         #if($col.Primitive)
  -        #set ($coldefval = "0")
  +		#set ($fktype = $col.JavaNative)
  +	    #set ($casttype = "")
  +        #if ($fktype == "short")
  +          #set ($casttype = "(short)")
  +        #elseif($fktype == "byte")
  +          #set ($casttype = "(byte)")
  +        #end
  +        #set ($coldefval = "0") 
           #set ($coldefval = $col.DefaultValue)
  -        copyObj.set${col.JavaName}($coldefval);
  +        copyObj.set${col.JavaName}($casttype $coldefval);
         #else
           #set ( $pkid = "null" )
           #set ( $cjtype = $col.JavaNative )
  
  
  

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