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
d7fdad71
Commit
d7fdad71
authored
Jan 10, 2019
by
Bernhard Schussek
Browse files
Fixed getMultiple() when ordering by ID
parent
219e681a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Repository/ORMRepository.php
View file @
d7fdad71
...
...
@@ -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