|
[
Permlink
| « Hide
]
Shay Banon added a comment - 19/Feb/08 04:35 PM
This seems to be a problem with Oracle driver which does not support meta data API. I will need to look into different solution for this without using the metadata API. For now, people can provide their own dialect and not call the metadata API.
Shay, any progress on this bug? I'm at the beginning of a project with Oracle 10G.
Are you going to use the JdbcGpsDevice?
I also add this problem, the solution is to use the generic ps.setObject as stated in http://forums.oracle.com/forums/post!reply.jspa?messageID=2286057
/**
Will this solution work for database types that are not strings? The metadata is used in order to know which type to convert the string to...
I tested with Integers and it worked fine.
From the PreparedStatement JavaDoc:
"The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database. " So it should work fine with all the types that where being distinguished. I read the javadoc, what I understood from it is that basically there is a mapping from java.land.Integer to the correspondant number type, not sure about String to number. What I am afraid is that it will work for oracle, but will not work for other databases.
I understand your concern.
How about creating a OracleJdbcDialect that extends the DefaultJdbcDialect and overrides that method. Yes, that can be done. I will try and do this, if you can go ahead and implement it, I will gladly apply the patch.
Sorry for the delay, no free time. Here it is.
I fixed it in trunk (changed a bit the database dialect resolver). Can you give it a try?
|
||||||||||||||||||||||||||||||||||||||||||