Hello silverstripe world!
I have done thoses two class:
class Exhibition extends DataObject
{
static $db = array('label' => 'Text');
static $has_many = array('events' => 'Event');
public function __construct()
{
parent::__construct();
}
}
and :
class Event extends DataObject
{
static $db = array(
'start_date' => 'Date',
'end_date' => 'Date'
);
static $has_one = array('exhibition' => 'Exhibition','country' => 'Country');
static $has_many = array('business_date_countries' => 'BusinessDateCountry','event_towns' => 'EventTown');
static $summary_fields = array(
'start_date', 'end_date'
);
public function __construct()
{
parent::__construct();
}
}
I can create records for exhibitions and events pretty well, but when i use the search listing option, the number of rows is correct but they are all empty ! and if i try to click over one of them i got a "BAD REQUEST" and " I can't handle sub-URLs of a ModelAdmin_CollectionController object" error messages;
Is somebody could have an idea ?...
Regards