You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Antonio Gallardo <ag...@agsoftware.dnsalias.com> on 2003/07/28 12:11:58 UTC
Support for BOOLEAN JDBC type.
Hi:
I have a table with a field using the boolean type. The error said:
org.apache.ojb.broker.OJBRuntimeException:
The type BOOLEAN for attribute usr_enable can not be handled by OJB.
Please specify only types as defined by java.sql.Types.
But the BOOLEAN type is defined in java.sql.Types :)
The source in question is:
at org.apache.ojb.broker.metadata.FieldDescriptor.getJdbcType
at org.apache.ojb.broker.metadata.FieldDescriptor.getColumnJdbcType
at org.apache.ojb.broker.util.SqlHelper.getSqlTypeRwAll
at org.apache.ojb.broker.accesslayer.StatementManager.bindInsert
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
I hope this problem will be resolved.
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
RE: Support for BOOLEAN JDBC type.
Posted by Ricardo Tercero Lozano <rt...@isoco.com>.
I see. If you look at org.apache.ojb.broker.metadata.FieldDescriptor
class code, in method getJdbcType(), you can see how the field
conversion between repository String an real JDBC type is implemented.
If you need support for BOOLEAN type I think you must add a comparison
for this data type.
Ricardo.
-----Original Message-----
From: Antonio Gallardo [mailto:agallardo@agsoftware.dnsalias.com]
Sent: lunes, 28 de julio de 2003 13:08
To: ojb-dev@db.apache.org
Subject: RE: Support for BOOLEAN JDBC type.
Hi:
I am again. Interesting enough:
The pointed page in OJB website said:
"OJB implements the mapping conventions for JDBC and Java types as specified
by the JDBC 2.0 specification."
But we can build OJB using JDBC 3.0.
Best Regards,
Antonio Gallardo
Antonio Gallardo dijo:
> Hi Ricardo:
>
> Here is a link to the 1.4 API:
> http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Types.html#BOOLEAN
>
> I asked to the list about BOOLEAN because it was not clear the OJB
> support for it. I know this is a compatibility problem: If we want to
> support J2SDK 1.3 we must forget the link above. :)
>
> Thanks for your tip.
>
> Best Regards,
>
> Antonio Gallardo
>
> Ricardo Tercero Lozano dijo:
>>
>> Refer to this page to see the available types:
>>
>> http://db.apache.org/ojb/jdbc-types.html
>>
>> The JDBC equivalent to java boolean is BIT.
>>
>> Ricardo.
>>
>>
>> -----Original Message-----
>> From: Antonio Gallardo [mailto:agallardo@agsoftware.dnsalias.com]
>> Sent: lunes, 28 de julio de 2003 12:12
>> To: ojb-dev@db.apache.org
>> Subject: Support for BOOLEAN JDBC type.
>>
>>
>> Hi:
>>
>> I have a table with a field using the boolean type. The error said:
>>
>> org.apache.ojb.broker.OJBRuntimeException:
>> The type BOOLEAN for attribute usr_enable can not be handled by OJB.
>> Please specify only types as defined by java.sql.Types.
>>
>> But the BOOLEAN type is defined in java.sql.Types :)
>>
>> The source in question is:
>>
>> at org.apache.ojb.broker.metadata.FieldDescriptor.getJdbcType
>> at org.apache.ojb.broker.metadata.FieldDescriptor.getColumnJdbcType
>> at
>> org.apache.ojb.broker.util.SqlHelper.getSqlTypeRwAll
>> at org.apache.ojb.broker.accesslayer.StatementManager.bindInsert at
>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb
>> at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
>> at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
>> at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
>>
>> I hope this problem will be resolved.
>>
>> Best Regards,
>>
>> Antonio Gallardo
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For
>> additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For
>> additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For
> additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
RE: Support for BOOLEAN JDBC type.
Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Hi:
I am again. Interesting enough:
The pointed page in OJB website said:
"OJB implements the mapping conventions for JDBC and Java types as
specified by the JDBC 2.0 specification."
But we can build OJB using JDBC 3.0.
Best Regards,
Antonio Gallardo
Antonio Gallardo dijo:
> Hi Ricardo:
>
> Here is a link to the 1.4 API:
> http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Types.html#BOOLEAN
>
> I asked to the list about BOOLEAN because it was not clear the OJB
> support for it. I know this is a compatibility problem: If we want to
> support J2SDK 1.3 we must forget the link above. :)
>
> Thanks for your tip.
>
> Best Regards,
>
> Antonio Gallardo
>
> Ricardo Tercero Lozano dijo:
>>
>> Refer to this page to see the available types:
>>
>> http://db.apache.org/ojb/jdbc-types.html
>>
>> The JDBC equivalent to java boolean is BIT.
>>
>> Ricardo.
>>
>>
>> -----Original Message-----
>> From: Antonio Gallardo [mailto:agallardo@agsoftware.dnsalias.com]
>> Sent: lunes, 28 de julio de 2003 12:12
>> To: ojb-dev@db.apache.org
>> Subject: Support for BOOLEAN JDBC type.
>>
>>
>> Hi:
>>
>> I have a table with a field using the boolean type. The error said:
>>
>> org.apache.ojb.broker.OJBRuntimeException:
>> The type BOOLEAN for attribute usr_enable can not be handled by OJB.
>> Please specify only types as defined by java.sql.Types.
>>
>> But the BOOLEAN type is defined in java.sql.Types :)
>>
>> The source in question is:
>>
>> at org.apache.ojb.broker.metadata.FieldDescriptor.getJdbcType
>> at org.apache.ojb.broker.metadata.FieldDescriptor.getColumnJdbcType
>> at
>> org.apache.ojb.broker.util.SqlHelper.getSqlTypeRwAll
>> at org.apache.ojb.broker.accesslayer.StatementManager.bindInsert at
>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb
>> at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
>> at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
>> at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
>>
>> I hope this problem will be resolved.
>>
>> Best Regards,
>>
>> Antonio Gallardo
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
RE: Support for BOOLEAN JDBC type.
Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Hi Ricardo:
Here is a link to the 1.4 API:
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Types.html#BOOLEAN
I asked to the list about BOOLEAN because it was not clear the OJB support
for it. I know this is a compatibility problem: If we want to support
J2SDK 1.3 we must forget the link above. :)
Thanks for your tip.
Best Regards,
Antonio Gallardo
Ricardo Tercero Lozano dijo:
>
> Refer to this page to see the available types:
>
> http://db.apache.org/ojb/jdbc-types.html
>
> The JDBC equivalent to java boolean is BIT.
>
> Ricardo.
>
>
> -----Original Message-----
> From: Antonio Gallardo [mailto:agallardo@agsoftware.dnsalias.com] Sent:
> lunes, 28 de julio de 2003 12:12
> To: ojb-dev@db.apache.org
> Subject: Support for BOOLEAN JDBC type.
>
>
> Hi:
>
> I have a table with a field using the boolean type. The error said:
>
> org.apache.ojb.broker.OJBRuntimeException:
> The type BOOLEAN for attribute usr_enable can not be handled by OJB.
> Please specify only types as defined by java.sql.Types.
>
> But the BOOLEAN type is defined in java.sql.Types :)
>
> The source in question is:
>
> at org.apache.ojb.broker.metadata.FieldDescriptor.getJdbcType
> at org.apache.ojb.broker.metadata.FieldDescriptor.getColumnJdbcType at
> org.apache.ojb.broker.util.SqlHelper.getSqlTypeRwAll
> at org.apache.ojb.broker.accesslayer.StatementManager.bindInsert
> at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb
> at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
> at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
> at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
> at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
>
> I hope this problem will be resolved.
>
> Best Regards,
>
> Antonio Gallardo
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
RE: Support for BOOLEAN JDBC type.
Posted by Ricardo Tercero Lozano <rt...@isoco.com>.
Refer to this page to see the available types:
http://db.apache.org/ojb/jdbc-types.html
The JDBC equivalent to java boolean is BIT.
Ricardo.
-----Original Message-----
From: Antonio Gallardo [mailto:agallardo@agsoftware.dnsalias.com]
Sent: lunes, 28 de julio de 2003 12:12
To: ojb-dev@db.apache.org
Subject: Support for BOOLEAN JDBC type.
Hi:
I have a table with a field using the boolean type. The error said:
org.apache.ojb.broker.OJBRuntimeException:
The type BOOLEAN for attribute usr_enable can not be handled by OJB. Please
specify only types as defined by java.sql.Types.
But the BOOLEAN type is defined in java.sql.Types :)
The source in question is:
at org.apache.ojb.broker.metadata.FieldDescriptor.getJdbcType
at org.apache.ojb.broker.metadata.FieldDescriptor.getColumnJdbcType
at org.apache.ojb.broker.util.SqlHelper.getSqlTypeRwAll
at org.apache.ojb.broker.accesslayer.StatementManager.bindInsert
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store
I hope this problem will be resolved.
Best Regards,
Antonio Gallardo
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org