3341 Posts in 982 Topics by 703 members
|Go to End|
16 January 2012 at 10:35am Last edited: 17 January 2012 12:42am
I'm not sure I fully understand all the inners of DataObject yet, but I'm surprised to see that executing DataObject::get() with a filter that returns no record returns nothing, rather than an empty DataObjectSet. Is this normal?
// assuming that the database contains no record which Date > CURDATE()
$news_articles = DataObject::get("NewsArticle", "Date > CURDATE()");
return $news_articles; // This returns NULL.
Thanks for your help!
|Go to Top|