I created an extension with a relation hasMany, we had modifications on tl_news.php file.
tl_news.php
PHP Code:
'restaurants' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_news']['restaurants'],
'exclude' => true,
'filter' => true,
'inputType' => 'select',
'foreignKey' => 'tl_restaurants.title',
'eval' => array('tl_class'=>'w50', 'multiple'=>true),
'relation' => array('type'=>'hasMany', 'load'=>'eager'),
'sql' => "varchar(255) NULL"
),
Now I want to get all the news by the id of a restaurant.
Is there a function to search on this field like findBy... ?
thank you,
Bookmarks