Re: no metadata set when using query chain with sql templates

From: Hannes Janetzek (jef..zi.de)
Date: Wed Jul 19 2006 - 20:55:32 EDT

  • Next message: Andrus Adamchik: "Re: no metadata set when using query chain with sql templates"

    Am Wed, 19 Jul 2006 18:00:44 -0400
    schrieb Andrus Adamchik <andru..bjectstyle.org>:

    > Hi Hannes,
    >
    > Yeah, QueryChain can't handle object conversion, as Cayenne stack
    > only supports a single metadata object per query. I guess it can at
    > least use the entity of the first query in a chain, still making it
    > kind of kludgy. At the very minimum it should return "true" for
    > "isFetchingDataRows", so that no conversion occurs. I'll work on
    > fixing this, so thanks for pointing it out.
    >
    > Still I don't understand why you need to use a chain in your case.
    > If you want different sets of results for different query values,
    > just run separate SQLTemplates multiple times. Chain doesn't really
    > help you here.
    >
    Ok, thanks. What I wanted was to search over different fields and to
    get one list of bibtex entrys. Now I found a solution by just putting
    everything in one sql statement.

    Regards.
    Hannes

    > Andrus
    >
    >
    > On Jul 19, 2006, at 7:13 PM, Hannes Janetzek wrote:
    >
    > > Hello,
    > >
    > > I have a problem with using the queryChain. I could track down the
    > > error
    > > to the point, that the generic metadata has no data and so
    > > conversion fails. Thats where the null-pointer comes from.
    > >
    > > QueryChain query = new QueryChain();
    > > query.addQuery(new SQLTemplate(Bibtex.class, "select * FROM BIBTEX
    > > WHERE "+type[i]+" REGEXP \""+keyword+"\""));
    > > getDataContext().performQuery(query)
    > >

    > > Am I doing somethig wrong or this a known issue?
    > >
    > > Regards,
    > > Hannes Janetzek
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >



    This archive was generated by hypermail 2.0.0 : Wed Jul 19 2006 - 18:52:55 EDT