Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Paginating Related Objects from an instance of an object.

Received: by 10.216.141.199 with SMTP id g49mr5343196wej.12.1339004671014;
        Wed, 06 Jun 2012 10:44:31 -0700 (PDT)
X-BeenThere: propel-development@googlegroups.com
Received: by 10.180.102.170 with SMTP id fp10ls4189190wib.4.gmail; Wed, 06 Jun
 2012 10:44:27 -0700 (PDT)
Received: by 10.216.201.147 with SMTP id b19mr5342035weo.9.1339004667851;
        Wed, 06 Jun 2012 10:44:27 -0700 (PDT)
Received: by 10.216.201.147 with SMTP id b19mr5342034weo.9.1339004667831;
        Wed, 06 Jun 2012 10:44:27 -0700 (PDT)
Return-Path: <cristianocino...@gmail.com>
Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53])
        by gmr-mx.google.com with ESMTPS id e10si852608wiz.3.2012.06.06.10.44.27
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 06 Jun 2012 10:44:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of cristianocino...@gmail.com designates 74.125.82.53 as permitted sender) client-ip=74.125.82.53;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cristianocino...@gmail.com designates 74.125.82.53 as permitted sender) smtp.mail=cristianocino...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-wg0-f53.google.com with SMTP id fm10so5134209wgb.22
        for <propel-development@googlegroups.com>; Wed, 06 Jun 2012 10:44:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=fQYM9GLwYBuGoydvk95+vzB1N18Z2uHiGTgy4GQhLnY=;
        b=0IW/8z7XPGQ23xUJkcXHD4ArfJ6MjL26l3MHzgD5O1Czql3NyGq8rm5eiGg+N0pr3c
         lbaeCwljSus8t9Cd3sqiST4EL8gmZl/cTcp1934lilcwGvXRf+Ys596F9VdnAFdyAawU
         dDayGhiMcfwMH6gbqcikqurI2phcoGw45iePvZQVrrCceWhCXnnk8Ws/Dag8klspg8je
         TzUUH860ywGIAP1kZVS8Y8iXVNbdh1fT0ESBAT5EI3BXeHCrGcXl/S9WFRXxOvulPK3F
         2gSsEm+KcbPAM35AARXbULMV8/+G1EaCVIyT7RTYl2kmCL1yxBERDv8BbMf3jwfHqkaM
         j+ng==
MIME-Version: 1.0
Received: by 10.216.198.19 with SMTP id u19mr17041948wen.203.1339004665818;
 Wed, 06 Jun 2012 10:44:25 -0700 (PDT)
Received: by 10.216.47.198 with HTTP; Wed, 6 Jun 2012 10:44:25 -0700 (PDT)
Received: by 10.216.47.198 with HTTP; Wed, 6 Jun 2012 10:44:25 -0700 (PDT)
In-Reply-To: <0778fa2b-31f3-4c54-a18d-64d22fb09683@googlegroups.com>
References: <0778fa2b-31f3-4c54-a18d-64d22fb09683@googlegroups.com>
Date: Wed, 6 Jun 2012 19:44:25 +0200
Message-ID: <CANJ_th1HWcS-DDdEbzcRU5WKFw184fk1PfZpMWRbYxbwVR7...@mail.gmail.com>
Subject: Re: [propel-dev] Paginating Related Objects from an instance of an object.
From: Cristiano Cinotti <cristianocino...@gmail.com>
To: propel-development@googlegroups.com
Content-Type: multipart/alternative; boundary=001636c5aa8d756f4004c1d151ce

--001636c5aa8d756f4004c1d151ce
Content-Type: text/plain; charset=ISO-8859-1

Hi, imho you should try to use PropelOnDemandFormatter, which hydrates
objects one by one, while you're using them. Get a look here
http://www.propelorm.org/reference/model-criteria.html. Cheers

Il giorno 06/giu/2012 19.03, "zeuben" <zeu...@gmail.com> ha scritto:
>
> I have reached a point where some particular objects in my model
(People), have literally thousands of items related to them.
>
> loading the 'detail' view for a person blows the memory limit if they
have a lot of items related to them.
>
> is there any way to 'paginate' the $detailItem->getRelatedObjectName()
[i.e. $person->getImages() ] methods to return an instance of
PropelModelPager?
>
> i know you can limit it outright with the criteria/modelQuery class, but
that is sort of clunky.
> another method would be to not use the ->getRelatedObjectName() method at
all and do a separate query.
>
> any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Propel Development" group.
> To post to this group, send email to propel-development@googlegroups.com
> To unsubscribe from this group, send email to
> propel-development+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/propel-development

--001636c5aa8d756f4004c1d151ce
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Hi, imho you should try to use PropelOnDemandFormatter, which hydrates o=
bjects one by one, while you&#39;re using them. Get a look here <a href=3D"=
http://www.propelorm.org/reference/model-criteria.html">http://www.propelor=
m.org/reference/model-criteria.html</a>. Cheers <br>
</p>
<p>Il giorno 06/giu/2012 19.03, &quot;zeuben&quot; &lt;<a href=3D"mailto:ze=
u...@gmail.com">zeu...@gmail.com</a>&gt; ha scritto:<br>
&gt;<br>
&gt; I have reached a point where some particular objects in my model (Peop=
le), have literally thousands of items related to them.<br>
&gt;<br>
&gt; loading the &#39;detail&#39; view for a person blows the memory limit =
if they have a lot of items related to them.<br>
&gt;<br>
&gt; is there any way to &#39;paginate&#39; the $detailItem-&gt;getRelatedO=
bjectName() [i.e. $person-&gt;getImages() ] methods to return an instance o=
f PropelModelPager?<br>
&gt;<br>
&gt; i know you can limit it outright with the criteria/modelQuery class, b=
ut that is sort of clunky.<br>
&gt; another method would be to not use the -&gt;getRelatedObjectName() met=
hod at all and do a separate query.<br>
&gt;<br>
&gt; any ideas?<br>
&gt;<br>
&gt; -- <br>
&gt; You received this message because you are subscribed to the Google<br>
&gt; Groups &quot;Propel Development&quot; group.<br>
&gt; To post to this group, send email to <a href=3D"mailto:propel-developm=
ent@googlegroups.com">propel-development@googlegroups.com</a><br>
&gt; To unsubscribe from this group, send email to<br>
&gt; <a href=3D"mailto:propel-development%2Bunsubscribe@googlegroups.com">p=
ropel-development+unsubscribe@googlegroups.com</a><br>
&gt; For more options, visit this group at<br>
&gt; <a href=3D"http://groups.google.com/group/propel-development">http://g=
roups.google.com/group/propel-development</a></p>

--001636c5aa8d756f4004c1d151ce--