You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Brendan Miller <bm...@dotster.com> on 2007/11/22 08:08:12 UTC

Oracle Date Village Patch

It seems I have a knack for running into problems that were discussed at
length and (partially?) solved ages ago.

That said, I have a table in Oracle with a column of type DATE.  It
doesn't matter whether I tell Torque this is a DATE or TIMESTAMP
column in the schema.xml, because as we all know, Village uses this 
crazy ResultSetMetaData business.  (SELECT * FROM TABLENAME WHERE 1 = -1 !!!)

So I read of several places where there is a Village patch that makes
re-interprets Oracle's reporting of DATE types to be Timestamps or
somesuch.  Bascially, something so that when I have a java.util.Date
field in one of my table objects, I can setField(new Date()) and have
the database show hours/minutes/seconds.

Where is this code?  Or what is the workaround?  I do not have the
freedom of altering the existing table to use timestamp types.

Brendan

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


Re: Oracle Date Village Patch

Posted by Raul Acevedo <ra...@cantara.com>.
It doesn't change the whole JVM, it's a flag for the Oracle JDBC  
driver.  I was a little leery of that also, but enough Google  
research seems to show that it only applies to the date/timestamp  
handling, though admittedly I did not find a site that definitely  
stated that.

Raul Acevedo
http://www.cantara.com

On Nov 22, 2007, at 2:28 AM, Brendan Miller wrote:

> On Thu, Nov 22, 2007 at 02:15:39AM -0500, Raul Acevedo wrote:
>> Supposedly starting the JVM with -Doracle.jdbc.V8Compatible=true  
>> fixes
>> this:
>>
>> http://wiki.apache.org/db-torque/OracleFAQ
>>
>> However it didn't work for me, even after setting the Torque  
>> mapping to
>> TIMESTAMP.  I had to change the columns from DATE to TIMESTAMP.
>
> Yes, I read of that "fix".  I was a little leery about changing the
> whole JVM.  We have other non-Torque/Village code that runs under the
> JVM that may rely on the present behavior.
>
> I was hoping to locate the Village patch I keep reading about. :)
>
> Brendan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


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


Re: Oracle Date Village Patch

Posted by Brendan Miller <bm...@dotster.com>.
On Thu, Nov 22, 2007 at 02:15:39AM -0500, Raul Acevedo wrote:
> Supposedly starting the JVM with -Doracle.jdbc.V8Compatible=true fixes 
> this:
>
> http://wiki.apache.org/db-torque/OracleFAQ
>
> However it didn't work for me, even after setting the Torque mapping to 
> TIMESTAMP.  I had to change the columns from DATE to TIMESTAMP.

Yes, I read of that "fix".  I was a little leery about changing the 
whole JVM.  We have other non-Torque/Village code that runs under the
JVM that may rely on the present behavior.

I was hoping to locate the Village patch I keep reading about. :)

Brendan

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


Re: Oracle Date Village Patch

Posted by Raul Acevedo <ra...@cantara.com>.
Supposedly starting the JVM with -Doracle.jdbc.V8Compatible=true  
fixes this:

http://wiki.apache.org/db-torque/OracleFAQ

However it didn't work for me, even after setting the Torque mapping  
to TIMESTAMP.  I had to change the columns from DATE to TIMESTAMP.

Raul Acevedo
http://www.cantara.com

On Nov 22, 2007, at 2:08 AM, Brendan Miller wrote:

>
> It seems I have a knack for running into problems that were  
> discussed at
> length and (partially?) solved ages ago.
>
> That said, I have a table in Oracle with a column of type DATE.  It
> doesn't matter whether I tell Torque this is a DATE or TIMESTAMP
> column in the schema.xml, because as we all know, Village uses this
> crazy ResultSetMetaData business.  (SELECT * FROM TABLENAME WHERE 1  
> = -1 !!!)
>
> So I read of several places where there is a Village patch that makes
> re-interprets Oracle's reporting of DATE types to be Timestamps or
> somesuch.  Bascially, something so that when I have a java.util.Date
> field in one of my table objects, I can setField(new Date()) and have
> the database show hours/minutes/seconds.
>
> Where is this code?  Or what is the workaround?  I do not have the
> freedom of altering the existing table to use timestamp types.
>
> Brendan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


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