Re: Another strange ClassCastException

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Nov 17 2003 - 18:50:39 EST

  • Next message: Michael Schuldt: "AW: Another strange ClassCastException"

    Michael,

    This is fixed in CVS. Before 1.0.4 goes out I would appreciate if you
    could test the fix. Please download patched Cayenne from

    http://objectstyle.org/downloads/cayenne/patched/cayenne-src-1.0.x-
    dev.tar.gz

    And let me know if it causes any problems. Also, I added more strict
    checks for read-only flattened relationship modification, so if you see
    exceptions like "Cannot modify the read-only flattened relationship",
    this is likely the code that didn't work before anyway. Still I'd like
    to know if this happens.

    Andrus

    On Nov 17, 2003, at 11:33 AM, Andrus Adamchik wrote:

    >
    > On Nov 17, 2003, at 11:07 AM, Michael Schuldt wrote:
    >
    >> Caused by: java.lang.ClassCastException
    >> at
    >> org.objectstyle.cayenne.access.SnapshotManager.isToOneTargetModified(S
    >> napsho
    >> tManager.java:313
    >
    > Same thing as before, only in a different place. Will fix it soon (and
    > also try to locate other places where Cayenne does a DataObject cast
    > without checking for faults).
    >
    >> Maybe the structure of my objects is important for this so I'm
    >> enclosing the
    >> important part of the xml-file.
    >
    > Yes, it confirms my idea that the problem is caused by flattened
    > relationships:
    >
    > <obj-relationship name="reaktiviertAls" source="TbAngebot"
    > target="TbAngebot" toMany="false">
    > <db-relationship-ref source="tb_angebot"
    > target="angebot_reaktivieren_assoz" name="toReaktiviertAssozVon"/>
    > <db-relationship-ref source="angebot_reaktivieren_assoz"
    > target="tb_angebot" name="fromReaktiviertAssozAls"/>
    > </obj-relationship>
    >
    > Andrus
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Nov 17 2003 - 18:50:44 EST