AW: XMLTYPE ?

From: René Kulschewski (KU..vu.de)
Date: Wed Dec 08 2004 - 09:48:10 EST

  • Next message: Andrus Adamchik: "Re: XMLTYPE ?"

    Hello,

    > > Is the XMLTYPE supported ? How must i map it ?
    >
    > As XMLTYPE is Oracle-specific extension and doesn't seem to
    > be directly supported via JDBC, it has to be read using
    > Oracle dirver API (yikes!):
    >
    > http://www.oracle.com/technology/sample_code/tech/java/codesni
    > ppet/jsp/xmltype/GetXMLTypeVal.java.html

    A this moment i use a SQLTemplate - that works.

    > To integrate this to Cayenne (and provide mapping to any Java
    > class you
    > want) you'd have to implement an ExtendedType:
    > http://objectstyle.org/cayenne/userguide/access-stack/extended
    > -types.html
    >
    > Let me know if this works. I wouldn't mind adding XMLTYPE
    > ExtendedType to Cayenne OracleAdapter.

    I tried to map it as Clob. But the SQL executed doesn't contain a
    "column.getclobval()" in the select-list. That would be enough IMHO.

    Actually executed is "select column from table" - causing a Error

    java.sql.SQLException: Illegal column type
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

    Should be "select column.getclobval() from table". This is what i do in the
    SQLTemplate now.

    Regards
    René



    This archive was generated by hypermail 2.0.0 : Wed Dec 08 2004 - 09:49:03 EST