You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Th...@cellzome.com on 2003/03/03 13:02:06 UTC

getCollectionByQuery and LONGVARCHAR type with oracle thin driver

Hi,
Did sommeone succeeded into running getCollectionByQuery() on objects
having a LONGVARCHAR field ?
I am using Oracle thin driver with OJB 0.9.9

ORA-00997: illegal use of LONG datatype

Here is my mapping for ths field :

<field-descriptor id="5" name="sequence" column="SQ" jdbc-type
="LONGVARCHAR"/>

If I comment out  the field descriptor for the LONGVARCHAR field,
everything works fine.

But if uncomment it I get the following exception : ORA-00997: illegal use
of LONG datatype when doing a query  like :

Criteria crit = new Criteria();
crit.addEqualTo("name", "foo");
Query q = QueryFactory.newQuery(Myclass.class, crit, true);
Collection c = broker.getCollectionByQuery(q);

Is there a known work around for this ?

Many thnaks,

Thomas