using distinct
on a entity that has a json field
#11049
Unanswered
leberknecht
asked this question in
Support Questions
Replies: 1 comment 1 reply
-
I could of course split that into two parts, first query with restriction to the id: $ids - $this->createQueryBuilder('i')
->select('i.id')
->distinct(true)
->setMaxResults($limit)
->getQuery()->getResult();
return $this->createQueryBuilder('i')->where('i.id in (:list)')->setParameter('list', $ids); that would do the trick i guess |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have an entity that has a json field:
Things are running mostly smoothly, but when i fire a distinct query, it creates problems:
When i run this im getting
The created query looks like this:
So what i would need is basically to somehow exclude the json field from the distinct columns. Is there any way to do that?
Note: simplified from real code to illustrate the problem. I can make a real-reproducable snippet if that helps)
Beta Was this translation helpful? Give feedback.
All reactions