db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Baker" <gary.ba...@movielink.com>
Subject RE: 'sysdate' as default value in oracle AND possible fix
Date Tue, 27 Apr 2004 15:03:10 GMT
A while back (Sept/03), I was having a problem setting "default" value
to "sysdate" in oracle. Torque-gen was screwing up and surrounding
"sysdate" with quotes.
 
here's the post...
http://www.mail-archive.com/torque-user@db.apache.org/msg01047.html
 
Someone asked me if I ever found a solution.
 
I ended up setting the required flag to "true" and then changing my app.
code to always populate the field.
This isn't ideal for me (unnecessary application code), but it got the
job done.
 
HOWEVER, I just took a quick look at the torque-gen code.  
It looks like the problem is in
"org.apache.torque.engine.database.model.TypeMap".
"DATE" is listed as a "TEXT_TYPE" (line 134) so that when
org.apache.torque.engine.database.model.Column.getDefaultSetting() is
called it surrounds it in quotes.  
 
I wonder if removing DATE from TEXT_TYPE in
org.apache.torque.engine.database.model.TypeMap would make it work?
 
The version of Torque that I'm looking at is several months old. Maybe
this has been corrected??
 
Cheers,
 
-G

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message