-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict null primary keys on update/delete, resolves #203 #205
Conversation
Thank you for the pull request. Please could you add tests for these changes to the pull request. |
No problem, tests committed. |
Not sure what the merge conflicts are here @treffynnon, did you want me to close this and resubmit a clean pull request? |
There's no need to close the pull request. Just update the branch. |
I'm not sure what the conflicts are. |
@cainmi try using git rebase, it should tell you where the conflicts are. |
If you pull in the develop branch from j4mie/idiorm into your cainmi/develop branch again it should throw a merge conflict that'll indicate where the problems are. |
This is failing on 5.2, due to an old version of PHPUnit. Should I throw a custom exception, similar to 47f6dea? |
You could wrap the call in a try/catch: try {
$widget = ORM::for_table('widget')
->use_id_column(array('id', 'primary'))
->select('foo')
->where('id', 1)
->where('primary', 1)
->find_one()
;
$widget->id(true);
} catch(Exception $e) {
return; // short-circuit to get pass
}
$this->fail('Exception was not thrown when it should have been'); // force a PHPUnit failure if we get past the exception |
….2) can't handle it
Restrict null primary keys on update/delete, resolves #203
No description provided.