Snippets - Little bits of code to make you happy
-
SnippetsOptimizing Complex Models
4 November 2010 | | | Supports v2.4, v2.3
TweetThe SilverStripe ORM engine (Sapphire) makes working with your database a breeze, but that simplicity comes at a cost. Each database query contributes to slower page load times and a complicated data structure can create significant performance issues.
Here are a number of strategies that can be employed to improve your website query performance:
Continue reading... -
SnippetsGetting items from a has_many or many_many relation
7 October 2010 | | | Supports v2.4, v2.3
TweetHave you ever found yourself using DataObject::get() to fetch objects in a has_many so that you can filter/sort them easily?
Well as it happens there is no need to do this thanks to a totally undocumented bit of code!
Continue reading...