There are no duplicates records. If I remove that criteria, I get expected results. I believe its because some Unit has 2 Endusers. How do I handle the pagination for this?
By setting ‘together’ to false, you will get the correct number of Unit models. But by doing so, you will not be able to search Units by the related endUsers anymore. It’s a trade off.
For detailed information about this problem, please read the following wikis.
I was wondering the same. Thanks for clearing this up.
But if I set ‘together’=> false , I dont see how I can atleast compare. It shows a ‘column not found’ DB error , where in the error I dont see this Table’s join.
In fact, the problem had been a very tough one for me. I started writing the "Drills" wiki just to illustrate the dilemma: you could just choose the one or the other according to the circumstance. I had been thinking that it should be a problem without any clear answer.
I think I could provide a decent solution to the problem in the wiki at least for MySQL users.