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
class Member { ... /** * @ManyToMany(targetEntity="Message") * @JoinTable(name="t_member_message", * joinColumns={@JoinColumn(name="member_id", referencedColumnName="id")}, * inverseJoinColumns={@JoinColumn(name="message_id", referencedColumnName="id")} * ) */ protected $messages; ... publicpublic function getMessages() { $criteria = Criteria::create()->where(Criteria::expr()->in("entity_type", ['system', 'test'])); return $this->messages->matching($criteria); } }
Notice: Array to string conversion in doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 91
SQL becomes
SELECT .... WHERE t.member_id = '111' AND te.entity_type = **'Array'**
Criteria method orWhere() doesn't work in many-to-many association as well
$criteria = Criteria::create()->where(Criteria::expr()->eq("entity_type", 'system')) ->orWhere(Criteria::expr()->eq("entity_type", 'test')); return $this->messages->matching($criteria);
SELECT .... WHERE t.member_id = '111' AND te.entity_type = 'system' **AND** te.entity_type = 'test'
The text was updated successfully, but these errors were encountered:
@shaunxq thanks for pointing this out. Could you please create a failing test case for this? You can find examples here: https://github.com/doctrine/doctrine2/tree/6e6be3fdd92728b26a79576f7f91abe4080e54ff/tests/Doctrine/Tests/ORM/Functional/Ticket
Sorry, something went wrong.
No branches or pull requests
SQL becomes
Criteria method orWhere() doesn't work in many-to-many association as well
SQL becomes
The text was updated successfully, but these errors were encountered: