Viewing entries tagged with 'dataobject'

silverstripe

Retrieving the values from an eNum field on a DataObject using the DataObjectDecorator

Posted by Gav on 28 June 2012 | 0 Comments

Tags: , ,

On a recent project I needed to add an eNum field to a DataObject in SilverStripe using a DataObjectDecorator. When I tried to get the values from the eNum object, I was received the following error: Fatal error: Call to undefined method DataObjectNameDecorator::dbObject() 

Read the full post

silverstripe

Adding a database index to a SilverStripe DataObject

Posted by Gav on 26 December 2011 | 1 Comments

Tags: , ,

If you have large amounts of data, you should be using database indexes. This is how you add a database index to a DataObject in Silverstripe.

Read the full post

silverstripe add please select dropdownfield

Adding a 'Please select' option to a SilverStripe DropdownField when using a DataObject->toDropdownMap

Posted by Gav on 14 July 2010 | 4 Comments

Tags: , , ,

This is so easy to do, once you know how, its not funny, but it has taken me months to work out. I always thought there was a bug with the DataObject->toDropdownMap method.

Read the full post