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.52.240.229 with SMTP id wd5mr40426770vdc.8.1339002187610;
        Wed, 06 Jun 2012 10:03:07 -0700 (PDT)
X-BeenThere: propel-development@googlegroups.com
Received: by 10.220.119.137 with SMTP id z9ls4227526vcq.2.gmail; Wed, 06 Jun
 2012 10:03:07 -0700 (PDT)
Received: by 10.52.94.111 with SMTP id db15mr1311614vdb.11.1339002187145;
        Wed, 06 Jun 2012 10:03:07 -0700 (PDT)
Date: Wed, 6 Jun 2012 10:03:06 -0700 (PDT)
From: zeuben <zeu...@gmail.com>
To: propel-development@googlegroups.com
Message-Id: <0778fa2b-31f3-4c54-a18d-64d22fb09683@googlegroups.com>
Subject: Paginating Related Objects from an instance of an object.
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1111_29103385.1339002186819"

------=_Part_1111_29103385.1339002186819
Content-Type: multipart/alternative; 
	boundary="----=_Part_1112_17645324.1339002186820"

------=_Part_1112_17645324.1339002186820
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

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->get*RelatedObjectName*() 
[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 ->get*RelatedObjectName*() method at 
all and do a separate query.

any ideas?

------=_Part_1112_17645324.1339002186820
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

I have reached a point where some particular objects in my model (People), have literally thousands of items related to them.<br><br>loading the 'detail' view for a person blows the memory limit if they have a lot of items related to them.<br><br>is there any way to 'paginate' the $detailItem-&gt;get<i>RelatedObjectName</i>() [i.e. $person-&gt;getImages() ] methods to return an instance of PropelModelPager?<br><br>i know you can limit it outright with the criteria/modelQuery class, but that is sort of clunky.<br>another method would be to not use the -&gt;get<i>RelatedObjectName</i>() method at all and do a separate query.<br><br>any ideas?<br>
------=_Part_1112_17645324.1339002186820--

------=_Part_1111_29103385.1339002186819--