Does obj.my_has_many.paginate cause the whole collection to be loaded?
Reported by Tom Locke | July 31st, 2008 @ 11:18 AM | in Beyond Hobo 1.0
Comments and changes to this ticket
-
Tom Locke July 31st, 2008 @ 11:19 AM
- State changed from new to open
-
Tom Locke March 12th, 2009 @ 01:41 PM
- Milestone changed from Hobo 1.0 - Final to Beyond Hobo 1.0
- Tag changed from performance, question to models, performance, question
-
Jeff Smick September 4th, 2009 @ 06:04 PM
This seems to be related to using "returning" in hobo/hobo/lib/hobo/model.rb:59
Changing this:
returning paginate_without_hobo_metadata(*args, &block) do |collection|
collection.member_class = self collection.origin = try.proxy_owner collection.origin_attribute = try.proxy_reflection._?.name
endTo this:
collection = paginate_without_hobo_metadata(*args, &block) collection.member_class = self collection.origin = try.proxy_owner collection.origin_attribute = try.proxy_reflection._?.name collection
Seems to solve the problem.
-
Jeff Smick September 4th, 2009 @ 06:05 PM
er.. sorry for the F'd up formatting. Don't know what happened there.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป