Daniel,
I was using Turbine 2.1 (the release) when I discovered this problem. Then,
I got the latest version from cvs and it was the same. I'm using Oracle
8.1.6. To solve it, I patched the Object.vm in torque. I've attached the
patch.
Thanks for your reply (I was starting to feel neglected),
Gabriel
Daniel Rall wrote:
> Gabriel Moreno <[EMAIL PROTECTED]> writes:
>
> > I have a table with a column declared as NUMERIC with a default value.
> > Torque is generating the right SQL ( after I modified db.props for
> > Oracle), but is generating this wrong java code:
> > private BigDecimal max_count=100;
> >
> > It should be:
> > private BigDecimal max_count=new BigDecimal(100);
>
> Right, but you certainly have not provided enough information for us
> to do anything about this. What version of Turbine are you using?
> What database are you using? Etc.
>
> Patches appreciated.
>
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Index: Object.vm
===================================================================
RCS file: /home/cvspublic/jakarta-turbine/conf/torque/templates/om/Object.vm,v
retrieving revision 1.57
diff -u -r1.57 Object.vm
--- Object.vm 2001/05/31 00:59:42 1.57
+++ Object.vm 2001/06/20 13:50:40
@@ -60,7 +60,11 @@
#set ( $defaultValue = "false" )
#end
#end
- #set ($defVal = "=$quote$defaultValue$quote")
+ #if ($cjtype == "BigDecimal")
+ #set ($defVal = "= new BigDecimal($defaultValue)")
+ #else
+ #set ($defVal = "=$quote$defaultValue$quote")
+ #end
#end
/** the value for the $clo field */
private $cjtype $clo$defVal;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]