FYI: Here is a bit more detail of why "T" value type is important for
Oracle TIMESTAMP data type:
Following is an excerpt from java.sql.Timestamp API Doc:
------------------------------------------------------------------------
-------------
public class Timestamp
extends Date
A thin wrapper around java.util.Date that allows the JDBC API to
identify this as an SQL TIMESTAMP value. It adds the ability to hold
the SQL TIMESTAMP nanos value and provides formatting and parsing
operations to support the JDBC escape syntax for timestamp values.
Note: This type is a composite of a java.util.Date and a separate
nanoseconds value. Only integral seconds are stored in the
java.util.Date component. The fractional seconds - the nanos - are
separate. The Timestamp.equals(Object) method never returns true when
passed a value of type java.util.Date because the nanos component of
a date is unknown. As a result, the Timestamp.equals(Object) method
is not symmetric with respect to the java.util.Date.equals(Object)
method. Also, the hashcode method uses the underlying java.util.Date
implementation and therefore does not include nanos in its computation.
Due to the differences between the Timestamp class and the
java.util.Date class mentioned above, it is recommended that code not
view Timestamp values generically as an instance of java.util.Date.
The inheritance relationship between Timestamp and java.util.Date
really denotes implementation inheritance, and not type inheritance.
On Jun 6, 2007, at 12:49 PM, Chuck Hill wrote:
On Jun 6, 2007, at 9:43 AM, Ken Anderson wrote:
Chuck,
jdbc2info is for Oracle...that's what I meant below by 'typeinfo
in the model is correct'.
I'm using TIMESTAMP, which I would greatly prefer to use. What
should the valueType be? I don't have anything for it...
Try 'T'
See details at bottom of http://developer.apple.com/documentation/
WebObjects/UsingEOModeler/4WorkingWithAttributes/
chapter_4_section_3.html#//apple_ref/doc/uid/TP30001018-CH204-BABFGECE
Chuck
On Jun 6, 2007, at 12:29 PM, Chuck Hill wrote:
Still have jdbc2info from Sybase in the model's connection
dictionary?
What is the vlauetype in the model? IIRC, EOF needs a special
type to deal with date only fields. IME, timestamps are a safer
bet.
Chuck
On Jun 6, 2007, at 9:11 AM, Ken Anderson wrote:
Everyone,
As you all probably know by now, I've been porting our Sybase
app to Oracle. I have a table that has a valid date in it in
Oracle, but when I fetch from that table, I get this error:
[2007-06-06 15:58:36,629] ERROR
com.commoditrack.model.CTEditingContext Exception raised prior
to save
com.webobjects.jdbcadaptor.JDBCAdaptorException:
[EMAIL PROTECTED] of type oracle.sql.TIMESTAMP is not
a valid Date type. You must use java.sql.Timestamp,
java.sql.Date, or java.sql.Time
at com.webobjects.jdbcadaptor.JDBCColumn._processValueIfNeeded
(JDBCColumn.java:289)
at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue
(JDBCColumn.java:323)
at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue
(JDBCColumn.java:307)
at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow
(JDBCChannel.java:1406)
at com.webobjects.eoaccess.EODatabaseChannel._fetchObject
(EODatabaseChannel.java:302)
Does anyone have any idea what could be causing this? My
typeinfo in the model is correct...
Thanks,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%
40global-village.net
This email sent to [EMAIL PROTECTED]
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/robertwalker1%
40mac.com
This email sent to [EMAIL PROTECTED]
--
Robert Walker
[EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]