LEFT JOIN RapsysBlogBundle:Keyword AS k ON (k.id = ak.keyword_id)
LEFT JOIN RapsysBlogBundle:KeywordTranslation AS kt ON (kt.keyword_id = k.id AND kt.locale = :locale)
GROUP BY a.id
-ORDER BY updated, created DESC
+ORDER BY updated, created DESC, a.id
LIMIT :offset, :count
SQL;
$req = <<<SQL
SELECT
b.id,
- b.created,
- b.updated,
- b.modified,
+ GREATEST(b.created, kat.created) AS created,
+ GREATEST(b.updated, kat.updated) AS updated,
+ GREATEST(b.created, b.updated, kat.created, kat.updated) AS modified,
b.body,
b.description,
b.slug,
a.id,
GREATEST(a.created, at.created, k.created, kt.created) AS created,
GREATEST(a.updated, at.updated, k.updated, kt.updated) AS updated,
- GREATEST(a.created, at.created, k.created, kt.created, a.updated, at.updated, k.updated, kt.updated) AS modified,
at.body,
at.description,
at.slug,