We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It is a bit strange, but you can't use model's magic methods (like Model::findById($id)) with literals disabled.
Even findFirst() with bind and conditions doesn't work! Only basic find() does. o_O
Phalcon\Mvc\Model\Exception: Literals are disabled in PHQL statements
#0 Phalcon\Mvc\Model\Query->parse() #1 Phalcon\Mvc\Model\Query->execute(Array([id] => 0), null) #2 Phalcon\Mvc\Model::findFirst(Array([conditions] => id = :id:, [bind] => Array([id] => 0)))
$user = Model\User::findFirst([ "conditions" => "id = :id:", "bind" => ["id" => $id] ]);
I thought magic methods are completely safe, aren't they?
The text was updated successfully, but these errors were encountered:
Think I am not wrong.
$account = Accounts::findFirst(array( 'conditions' => 'id = :id:', 'bind' => ['id' => 2] ));
Can look like Model \ User defined it?
Sorry, something went wrong.
This is happening because of the LIMIT 1 at the end of the query :/
This has been fixed, could you please check and close the bug if everything works for you?
e40a8bd
No branches or pull requests
It is a bit strange, but you can't use model's magic methods (like Model::findById($id)) with literals disabled.
Even findFirst() with bind and conditions doesn't work! Only basic find() does.
o_O
I thought magic methods are completely safe, aren't they?
The text was updated successfully, but these errors were encountered: