cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Reich <markus.re...@markusreich.at>
Subject Re: Disabling caching for relationship queries
Date Fri, 10 May 2013 05:25:12 GMT
thx, now everything is much clearer :-)


2013/5/9 Andrus Adamchik <andrus@objectstyle.org>

> In this situation related objects are not fetched by the query (they are
> resolved when you read them via getter of MiiPickingcontainer). So there's
> no any specific caching/refreshing rules involved. Instead related objects
> simply stay around as long as their owning MiiPickingcontainer objects are
> in scope.
>
> To refresh relationships when you execute a query, you need to specify
> prefetching for each relationship you care to refresh:
>
>
> http://cayenne.apache.org/docs/3.1/cayenne-guide/performance-tuning.html#prefetching
>
> Andrus
>
> On May 8, 2013, at 2:48 PM, Markus Reich <markus.reich@markusreich.at>
> wrote:
>
> > e.g.
> >    SelectQuery query = new SelectQuery(MiiPickingcontainer.class);
> >    query.setQualifier(expression);
> >    query.addOrdering(MiiPickingcontainer.MESSTART_PROPERTY,
> > SortOrder.ASCENDING);
> >
> >    @SuppressWarnings("unchecked")
> >    List<MiiPickingcontainer> containers = ctxt.performQuery(query);
> >    return containers;
> >
> > MiiPickingcontainer has n MiiPickingcontainerPositions and a Position has
> > an 1:1 order
> >
> >
> > 2013/5/8 Andrus Adamchik <andrus@objectstyle.org>
> >
> >> Which query are we talking about? Could you provide a code sample
> please.
> >>
> >> Andrus
> >>
> >> On May 8, 2013, at 2:37 PM, Markus Reich <markus.reich@markusreich.at>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> is there a possibility to disable the default cayenne caching mechanism
> >>> used to get relational data?
> >>> I already set Shared Cache to false and Number of Objects to 0, but it
> >>> still doesn't work :-(
> >>>
> >>> regards
> >>> Meex
> >>
> >>
> >
> >
> > --
> > *Markus Reich*
> > Moosbach 28/2
> > 6392 St. Jakob i.H.
> > www.markusreich.at / www.meeximum.at
> > markus.reich@markusreich.at
>
>


-- 
*Markus Reich*
Moosbach 28/2
6392 St. Jakob i.H.
www.markusreich.at / www.meeximum.at
markus.reich@markusreich.at

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message