-
Notifications
You must be signed in to change notification settings - Fork 57
Wrong results using query builder #138
Comments
Hi, Indeed, the sql query built is wrong. This is a tricky bug. :\ I guess there is many some refactoring to do to fix this bug, i cannot assure you i'll fix it soon :. Sorry. |
Issue come from here IMO we have to make a better system of repartition of criterias, to be able to optimize joins and make better assertions. |
Hi stephpy, |
Thanks. |
Hi all... Sorry about that... |
No, sorry. TimelineBundle->QueryBuilder looks a tricky solution if you want to do a complex query. |
I have querybuilder:
But the problem is with data hydrator. In view, I don't see components. How join all components? |
You can use the same behaviour than this: https://github.com/stephpy/timeline-bundle/blob/master/Driver/ORM/TimelineManager.php#L45 |
@stephpy thanks:)
|
You're welcome. |
Hi,
I'm facing a wrong behaviour while using the query builder.
I have to retrieve the actions made by a given user.
I know I can do:
But, for several reasons and since my app offer the possibility to filter by verb, i want to do i like this:
The two options described should return the same results, but it's not true. The second one returns more rows (and theese more rows doesn't belong to the given user).
Using the profiler i've found the query that is produced:
I've found that i have different "components" that have identifier with value: 's:2:"39";' but different model. So since the where clause does the where on the different joins it matches also the rows that have the given identifiers but for another model; and, of course, it returns that rows in the results.
Am i missing something? Maybe the problem is in the "same identifier" been created?
Any kind of help will be appreciated.
Thanks and forgive me for my written english.
The text was updated successfully, but these errors were encountered: