How do I delete rows from a database using entity framework with a condition?
For example, I could use the following query today:
But I was trying to use the finder to scope the rows and delete, but doesn't seem like delete is an option?
Thank you!
For example, I could use the following query today:
Code:
$db->query('DELETE FROM mytable WHERE timestamp > ?', [$timestamp]);
But I was trying to use the finder to scope the rows and delete, but doesn't seem like delete is an option?
Code:
\XF::finder('myaddon:myentity')->where('timestamp', '>', $timestamp)->delete();
Thank you!
Last edited: