it should still fix some issue Well, I decided to give up on this, and just go for a solution similar to the one described by myself and @Duniyadnd in the comments on my question. I have a table objects. It only contained an ID. I added a field 'likes'. And created two triggers: One for the newLike, and one for a deletedLike which would update the likes column at the given object_ID.
posts.object_ID, posts.user_ID, posts.datetime, posts.text, objects.likes,
SUM(IF(likes.user_ID=?, 1, 0)) AS allowLike, users.first_name, users.last_name,
LEFT JOIN users ON users.ID=posts.user_ID
LEFT JOIN friends ON (friends.user_ID_1=? OR friends.user_ID_2=?) AND friends.approved=1
LEFT JOIN userinfo ON users.ID=userinfo.user_ID
LEFT JOIN objects ON objects.ID=posts.object_ID
LEFT JOIN likes ON likes.object_ID=posts.object_ID
WHERE ". $str ."
GROUP BY posts.object_ID ORDER BY posts.datetime DESC LIMIT 0,30
JPA/JPQL returns incomplete results with WHERE x.y IS NULL OR x.y.z = 1
like below fixes the issue For someone named Johnny U Dawg, your query as is should return results. For someone named Johnny U. Dawg, you may want to add the ClassicFilterFactory or LetterTokenizerFactory and it should return results.
Realm Query Returns Incomplete Results Set In Android
I wish this helpful for you After a lot of hours digging and experimenting I discovered that the underlying issue here are hidden characters in the mysql table. Mainly a specific hidden "non breaking space" character that had creeped in the data splitting words (for example when I used utf8_encode to encode a string in php it showed: RoyÂal.