I am trying to do something similar to the results of this post (https://forum.phalcon.io/discussion/183/insert-and-delete-multiple-related-records), but I am having troubles making this work, as well as just getting deletion to work normally.
```foreach($deletable as $single) { $user = UserProjects::findFirst(array( 'conditions' => 'user_id=?0 and project_id=?1 and is_stakeholder=1', 'bind' => array( $single, $project->id ) ));
var_dump($user->delete());
exit;
This throws me a PDOException. I ran some code to show me the queries being generated, and for some reason I am getting: DELETE FROM `users_projects` WHERE. There is nothing getting appended to the end of the query.
I have ensured that I am getting a result from the initial findFirst, but, after that, nothing happens. Any ideas? I'm on Phalcon 0.9.1.