RE: Trying to set qualifier on a saved query?

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Wed Aug 31 2005 - 15:47:59 EDT

  • Next message: Jeff de Vries: "Re: Trying to set qualifier on a saved query?"

    According to my 1.2 code tree (which isn't up to 1.2M5 yet), I see:

    if (useCache && name == null)
      throw ... ; // the exception you are seeing

    The "name" variable is being set by query.getName(). Are you sure your
    query name is being saved/set? Double-check the saved XML file to
    ensure the name is saved correctly. Make sure you don't have a typo in
    the name, too.

    /dev/mrg

    -----Original Message-----
    From: Jeff de Vries [mailto:jdevrie..frog.com]
    Sent: Wednesday, August 31, 2005 3:19 PM
    To: cayenne-use..bjectstyle.org
    Subject: Re: Trying to set qualifier on a saved query?

    I made that change, but it didn't make any difference. Here's more
    detail on the actual error I'm getting:

    Exception in thread "main"
    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2M5 July 22 2005]
    Caching of unnamed queries is not supported.
        at
    org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(Data
    ContextSelectAction.java:104)
        at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
    :1258)
        at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java
    :1203)

    Just for grins, I turned "Shared Cache" off, and turned "Refresh
    Results" back on, and that *does* work.

    Gentry, Michael (Contractor) wrote:
    >I haven't done this, but in the modeler, make your qualifier "availNew
    =
    >1" ...
    >
    >-----Original Message-----
    >From: Jeff de Vries [mailto:jdevrie..frog.com]
    >Sent: Wednesday, August 31, 2005 2:09 PM
    >To: cayenne-use..bjectstyle.org
    >Subject: Trying to set qualifier on a saved query?
    >
    >
    >I'm trying to create a saved "object select query" using Modeler. My
    >object has a boolean field named "availNew". In the "SelectQuery
    >Settings" I'm entering "availNew" into the "Qualifier" text box. (I'm
    >also setting "Shared Cache" and unchecking "Refresh Results" as this is

    >a small, read-only table).
    >
    >In my code I'm doing:
    > List result = dc.performQuery("MyQuery",false);
    >
    >What happens is I get an exception about "unnamed queries".
    >
    >I have other saved queries that are not using the Qualifier field that
    >are all working fine, so it is something about the qualifier.
    >
    >Thanks,
    >Jeff de Vries
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Aug 31 2005 - 15:48:03 EDT