cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hannes Janetzek <j...@tzi.de>
Subject Re: no metadata set when using query chain with sql templates
Date Thu, 20 Jul 2006 00:55:32 GMT
Am Wed, 19 Jul 2006 18:00:44 -0400
schrieb Andrus Adamchik <andrus@objectstyle.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
> >
> >
> >
> >
> >
> >
> >
> >

Mime
View raw message