Re: Executing saved SQL

Tony Giaccone <[email protected]>
Newsgroups gmane.comp.java.cayenne.user
Message-ID <CALQ75kG4jNHCD=M2WSxymrHDjh3kr7znNYDEedaThdCGRwF-wA@mail.gmail.com>
Yeah, I single steppe through the code to find out what got returned, and
I'm good, thank you for your help.

I'm now getting the result I was expecting and it's looking good.


Tony

On Fri, Apr 9, 2021 at 12:52 PM John Huss <[email protected]> wrote:

> If you mean it takes a generic type parameter, then you would probably want
> to use DataRow if it is a raw SQL query mapped in the modeler.
>
> On Fri, Apr 9, 2021 at 11:35 AM Tony Giaccone <[email protected]> wrote:
>
> > No, it's not a column  in a table, it's a composite value it doesn't
> belong
> > to any object.
> >
> > My current guess is this:
> >
> > QueryResult result =  MappedExec.*query*("calcClob").execute(context);
> >
> >
> > but java wants a parameter type for the QueryResult.  And I'm not sure
> that
> > the MappedExec is the right choice either.
> >
> > MappedSelect says it can return a SQLTemplate, which is what this is. But
> > it seems to need a mapped object which I don't have in this case.
> >
> >
> >
> > Tony
> >
> > On Fri, Apr 9, 2021 at 12:21 PM John Huss <[email protected]> wrote:
> >
> > > Perhaps this?
> > >
> > > Selecting individual columns:
> > >
> > >
> >
> https://cayenne.apache.org/docs/4.1/cayenne-guide/#selecting-individual-columns
> > >
> > > On Fri, Apr 9, 2021 at 11:03 AM Tony Giaccone <[email protected]>
> wrote:
> > >
> > > > So I have a query that does a complicated select, and returns a list
> > > > containing a single clob for each row.
> > > >
> > > > What I'm not sure about is when I execute that query, How to handle
> the
> > > > result.
> > > >
> > > > How do I explain to Cayenne that the result is not a mapped object
> but
> > > just
> > > > a list of clobs?
> > > >
> > > >
> > > > Tony
> > > >
> > >
> >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.