-
1. Re: Which Data Type should I use to map a XMLType column of
scoy Nov 10, 2002 10:24 PM (in response to lei.liu)Oracle 9i stores XMLType as CLOB, so you could use jdbc and sql type mappings of "CLOB" (be sure to use JBoss 3.0.4 or newer AND the Oracle "oci" JDBC drivers for this to work properly).
However, this will only give you access to the raw data (which may be the XML text, but I don't know). If you want to exploit Oracle's XML capabilities, you will probably need to use BMP.
Steve -
2. Re: Which Data Type should I use to map a XMLType column of
rakn Nov 11, 2002 3:56 AM (in response to lei.liu)Hi,
I'm using Oracle 9.2i and for storing a xml files a use CLOB.
Hovewer I'd not change anything in the file standardjbosscmp-jdbc.xml because this is for having a standard mapping. Instead I use a jbosscmp-jdbc.xml (\META-INF) for a customized mapping. -
3. Re: Which Data Type should I use to map a XMLType column of
lei.liu Nov 12, 2002 4:32 PM (in response to lei.liu)thanks a lot :-)
yours
lei -
4. Re: Which Data Type should I use to map a XMLType column of
lei.liu Nov 12, 2002 4:43 PM (in response to lei.liu)>Oracle 9i stores XMLType as CLOB, so you could use jdbc
>and sql type mappings of "CLOB" (be sure to use JBoss
>3.0.4 or newer AND the Oracle "oci" JDBC drivers for
>this to work properly).
>However, this will only give you access to the raw data
>(which may be the XML text, but I don't know). If you
>want to exploit Oracle's XML capabilities, you will
>probably need to use BMP.
>Steve
Hi, Steve,
Thanks a lot for your help!
another question for you, what is the Oracle "oci" JDBC Drivers, is it not the standard JDBC Driver, that one can find on the Oracle Homepage?
I have also tried to map the XMLType using sql type mapping of "CLOB", but it seems not to work properly. Althrough I can add an entry in DB, but by the findByPrimaryKey(...) method I get only a null value for the XMLType value.
Sorry for so many questions, I am a newbie here :-)
Thanks a lot!
yours
Lei -
5. Re: Which Data Type should I use to map a XMLType column of
scoy Nov 12, 2002 7:49 PM (in response to lei.liu)Please read the "Map Java byte[] to database BLOB ?" thread.
Most of the answers are there.
Are you using JBoss 3.0.4? LOB support in general was problematical in earlier releases.
Steve -
6. Re: Which Data Type should I use to map a XMLType column of
lei.liu Nov 14, 2002 4:12 PM (in response to lei.liu)yes, I got it.
thanx a lot again :-)
best regards
Lei