| 1 | <?php |
||
| 3 | class Designer extends DataObject |
||
|
|
|||
| 4 | { |
||
| 5 | private static $db = array( |
||
| 6 | "Name" => "Varchar", |
||
| 7 | "Location" => "Varchar", |
||
| 8 | "Notes" => "Varchar(255)", |
||
| 9 | "Rate" => "Enum('$,$$,$$$,$$$$,$$$$$', '$$$')" |
||
| 10 | ); |
||
| 11 | |||
| 12 | private static $has_one = array( |
||
| 13 | "Sample1" => "Image", |
||
| 14 | "Sample2" => "Image", |
||
| 15 | "Sample3" => "Image" |
||
| 16 | ); |
||
| 17 | |||
| 18 | private static $belongs_many_many = array( |
||
| 19 | "DesignersPages" => "DesignersPage" |
||
| 20 | ); |
||
| 21 | |||
| 22 | private static $default_order = "\"Rate\" ASC, \"Name\" ASC"; |
||
| 23 | } |
||
| 24 | |||
| 35 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.