[ 
https://issues.apache.org/jira/browse/TORQUE-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637335#comment-13637335
 ] 

Thomas Fox commented on TORQUE-277:
-----------------------------------

Currently there is no easy way to do this.
As a workaround, you can override the doUpdate(dbObject, Connection) method in 
peerImpl and plug in the code from 
org.apache.torque.util.BasePeerImpl.doUpdate(Criteria, ColumnValues, 
Connection), remocing the column you want to set the sysdate from the 
ColumnValues and adding the according statement to the update query manually.
The long term solution would be to modify the JdbcTypedValue object in the 
Torque runtime such that it can also carry verbatim SQL (not only a value to be 
inserted into a prepared statement)
                
> Need ability to update a date column during update to sysdate
> -------------------------------------------------------------
>
>                 Key: TORQUE-277
>                 URL: https://issues.apache.org/jira/browse/TORQUE-277
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime
>    Affects Versions: 4.0
>            Reporter: rajguru
>
> I have an entity which has a timestamp column. On every update to the record 
> in that table (using save() method) I need to set that column to the SYSDATE. 
> I would like to add columnName=SYSDATE while constructing the query itself 
> i.e. Criteria from which the query gets formed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to