Skip to content

Order List Objects from ManyToOneRelation #16934

Answered by genfish
genfish asked this question in Q&A / Support
Discussion options

You must be logged in to vote

Would this be a correct solution?

$ArticleList->onCreateQueryBuilder(function (\Doctrine\DBAL\Query\QueryBuilder $queryBuilder) use ($ArticleList) {
	$table = $ArticleList->getDao()->getTableName();
	$queryBuilder->leftJoin($table, 'object_query_$idUserTable', 'user', "user.oo_id = $table.user__id")->orderBy('user.username', 'DESC');
});

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@markus-moser
Comment options

Answer selected by genfish
Comment options

You must be logged in to vote
1 reply
@markus-moser
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants