Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CWD
CwdDataDoctrineORMBundle
Commits
3a86b753
Commit
3a86b753
authored
Jan 10, 2019
by
Bernhard Schussek
Browse files
Merge branch 'bugfix/id-sorting' into 'master'
Fixed getMultiple() when ordering by ID See merge request
!6
parents
219e681a
d7fdad71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Repository/ORMRepository.php
View file @
3a86b753
...
...
@@ -147,7 +147,13 @@ abstract class ORMRepository extends EntityRepository implements EditableReposit
->
execute
();
// Maintain the order of IDs
$sortedAggregates
=
array_replace
(
array_flip
(
$idStrings
),
$aggregates
);
$sortedAggregates
=
[];
foreach
(
$ids
as
$id
)
{
if
(
isset
(
$aggregates
[
$id
->
toString
()]))
{
$sortedAggregates
[
$id
->
toString
()]
=
$aggregates
[
$id
->
toString
()];
}
}
$cursor
=
new
ArrayCursor
(
$sortedAggregates
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment