db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vidas Simkus <vi...@simkus.org>
Subject Database generated default values.
Date Fri, 29 Oct 2004 20:44:54 GMT
Hi, guys

I've searched high and low for an answer to this one to no avail.  I'm 
hoping that someone here will be able to help me out.

I'm trying to specify a default column value that would be provided by 
the database.  In particular a value returned by Oracle's 'sysdate'.  If 
I specify 'sysdate' as a value for the default attribute in the column 
definition I get a compile error:

[javac] symbol  : variable sysdate
[javac] location: class edu.uic.csr.webapps.TTP.opl.BaseInterviewHeader
[javac]     private Date insertionDate = new Date(sysdate);

If I manually modify the table and set the default value to 'sysdate', 
the Torque generated classes will try to set the column value to NULL.  
This cause Oracle to spew an ugly error message about a 'not null' 
constraint violation.

Any suggestions?

Thanks in advance.


My favorite animal is steak.
-Fran Lebowitz

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

View raw message