Re: Prefetch weirdness

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Dec 08 2005 - 14:29:45 EST

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-405) Support mapping of multiple entities to a generic class (CayenneDataObject)"

    Cris,

    Nothing comes to mind right away as to what could've cause it.

    If you have a minute, could you create a test case to reproduce the
    problem? As prefetching code was rewritten almost entirely, we'd
    rather investigate what causes it.

    Andrus

    On Dec 8, 2005, at 9:32 PM, Cris Daniluk wrote:

    > I just moved to the latest CVS to work on the hsql stuff and I am all
    > of a sudden getting an exception at this block of code whenever I
    > prefetch a to-one relationship:
    >
    > if (incoming.isToMany()) {
    > ToManyList toManyList = (ToManyList) object.readProperty
    > (getName());
    >
    > // TODO, Andrus 11/15/2005 - if list is modified,
    > shouldn't we attempt to
    > // merge the changes instead of overwriting?
    > toManyList.setObjectList(related != null ? related : new
    > ArrayList(1));
    > }
    > else {
    > // this should've been handled earlier in 'linkToParent'
    > throw new CayenneRuntimeException(
    > "To-one relationship wasn't handled properly: " +
    > incoming.getName());
    > }
    >
    > It could certainly be a problem with my map that wasn't being exposed
    > until now. I haven't had time to dig into it yet, but its definitely
    > something that started happening between M7 and now. Considering the
    > prefetch work, I thought I'd point it out.
    >
    > Cris
    >



    This archive was generated by hypermail 2.0.0 : Thu Dec 08 2005 - 14:29:52 EST