What is the best way to manage a 1:1 relation in Silverstripe with the following example. It's easy to add the $db fields to the page, but if I want to maintain it as a separate Dataobject, whats the best way? (Lot of info on 1:many, but not 1:1) eg.
class CarSpecs extends Dataobject {
private static $db = array(
'Make' => 'Text',
'Model' => 'Text',
'ModelDescription' => 'Text',
'NumberOfSeats' => 'VarChar(20)',
'Price' => 'Currency'
}
class Car extends Page {
private static $has_one = array('CarSpecs' => 'CarSpecs');
}
Silverstripe automatically adds a page ID to the database table in Car to find CarSpecs, but what about in Carspecs? How to I add and edit the related fields in the CMS.