Re: Problem with DataFormat and XML Serialise/Deserialise

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri May 25 2007 - 06:07:00 EDT

  • Next message: Michael Gentry: "Re: unsubscribe"

    On May 25, 2007, at 12:50 PM, Adrian Wiesmann wrote:

    > Hello Andrus
    >
    >> I guess I am going to add some failover strategy that
    >> would try a previous formatter in case of parse exceptions..
    >
    > Sounds great. I had 2 thoughts about that:
    >
    > - Probably this should be "backported" to the stable version as
    > well. IIRC
    > decoding/encoding was added somewhen after version 1.1?

    +1

    Do you have a few minutes to help turning this commit into patches
    against 1.1 and 1.2:

    http://svn.apache.org/viewvc?view=rev&revision=541595

    > Another sidenote: Have you (or anybody else) ever thought about
    > using the
    > decoder/encoder plus the XML with the database structure (map.xml) for
    > automatic DB update purposes (magically alter table etc)?

    For data updates - sure this should work. For schema updates - it may
    work for certain cases, but generally this is a very complicated
    task. There were extensive discussions in the past about altering
    schema from CayenneModeler, and the consensus was that a generic
    implementation is hard and beyond Cayenne scope.

    At the same time I've been looking to implement a similar algorithm
    (outside Cayenne but based on Cayenne schema) for one of my projects,
    and it is possible if you make some assumptions about the nature of
    the schema changes (e.g. only support add/drop column, create/drop
    table ops) and do not support porting the data (e.g. no "rename
    column").

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri May 25 2007 - 06:07:32 EDT