Re: XML Data Types

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Dec 09 2005 - 04:21:01 EST

  • Next message: Cris Daniluk: "DataContext loses resolver after serialization"

    On Dec 9, 2005, at 5:50 AM, Randy Leonard wrote:

    > I am primarily interested in ability to read/write to XML data
    > types to/from the database. Query support on XML columns would
    > also be welcome. Pending lack of direct XML data type support, are
    > there work-arounds that could be implemented in Cayenne?

    Ok, this what I thought.

    Check out ExtendedTypes API:

    http://objectstyle.org/cayenne/userguide/access-stack/extended-
    types.html

    This is a way to extend Cayenne to handle *Java* types that are not a
    part of JDBC spec. AFAIK some folks used that to map XML stored as
    CLOBs. In addition to that if the database type itself is not
    supported by JDBC, you will need to check the vendor driver
    documentation on how to read and write this value inside your
    ExtendedType. E.g. Oracle has this proprietary API:

    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/
    jsp/xmltype/index.html

    SQLTemplate is your friend to query such types.

    Having said that I am open to suggestions on how to handle this in
    Cayenne in a generic fashion.

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Dec 09 2005 - 04:21:11 EST