Hello,
please can anybody tell me how to use white list while updating or creating the Model?
For example, let's say we have Model for sql table news with three columns:
id, title, contents
$entity = new \News();
$entity->id = 10;
$entity->title = uniqid('New title ');
// Few examples of $whiteList tryings
//$whiteList = 'title';
//$whiteList = 'news.title';
$whiteList = get_class(entity).'.title';
$entity->update(null,$whiteList);
No matter how i try to pass title to the white list so it should(?) ignore rest of the columns while updating, update is generating error: "contents is required".
Of course I can dynamically create PHQL query for update, but I thought it should be possible in the ORM.