[FIXED] Re: Bug in latest cvs --No suitable DataNode to handle query with root: class [dataobject class]

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Feb 12 2004 - 23:10:07 EST

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-97) running out of Connections ?!?"

    Just fixed the problem that I think was causing this error. Since
    anonymous CVS is about a day behind, here is the patch.

    Andrus

    Index: src/cayenne/java/org/objectstyle/cayenne/access/DataDomain.java
    ===================================================================
    RCS file:
    /cvsroot/cayenne/cayenne/src/cayenne/java/org/objectstyle/cayenne/
    access/DataDomain.java,v
    retrieving revision 1.55
    diff -u -r1.55 DataDomain.java
    --- src/cayenne/java/org/objectstyle/cayenne/access/DataDomain.java
    11 Feb 2004 04:43:32 -0000 1.55
    +++ src/cayenne/java/org/objectstyle/cayenne/access/DataDomain.java
    13 Feb 2004 04:03:45 -0000
    ..-537,7 +537,14 @@
           */
          public DataNode lookupDataNode(DataMap map) {
              synchronized (nodesByDataMapName) {
    - return (DataNode) nodesByDataMapName.get(map.getName());
    + DataNode node = (DataNode)
    nodesByDataMapName.get(map.getName());
    + if (node == null) {
    + reindexNodes();
    + return (DataNode)
    nodesByDataMapName.get(map.getName());
    + }
    + else {
    + return node;
    + }
              }
          }



    This archive was generated by hypermail 2.0.0 : Thu Feb 12 2004 - 23:10:17 EST