db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: Binding a char to PreparedStatement
Date Wed, 20 Jul 2005 16:48:24 GMT
Hi Andy,

On Jul 20, 2005, at 9:40 AM, Andy Jefferson wrote:

>>> "The jdbc-type attribute declares the type of the column in the
>>> database. This type is defaulted based on the type of the field
>>> being mapped."
>>>
>>> Does this mean, that an implementation may choose for an default?
>>>
>>
>> That was not the intent. The intent was that the JDBC type would be
>> obvious. ;-) And the "obvious" jdbc-type for char and Character is
>> CHAR. I'll raise this issue with the JDO experts to be sure.
>>
>
> Well in the case of a char it is, but in the case of a java double for
> example ? It all depends on the RDBMS. Some RDBMS support DOUBLE, some
> DECIMAL, some NUMERIC, some have other types ...

This is the jdbc-type ("generic sql type"), not the sql-type we're  
talking about (there is a separate sql-type that the user can specify  
if they want to get database specific).

The idea is that the user could override the jdbc-type if necessary,  
and the jdo impl would use jdbc-type plus length plus nullability to  
map to a natural sql-type that is database specific.

Thanks,

Craig
>
> -- 
> Andy
> Java Persistent Objects - JPOX
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message