Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column is primaryOwnerId not ownerId #15629

Merged
merged 3 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fixed a bug where relational fields’ element query results weren’t limited to the selected relations if the `id` param was overridden. ([#15570](https://github.com/craftcms/cms/issues/15570))
- Fixed a bug where ordering element queries by textual custom fields would factor in character marks. ([#15609](https://github.com/craftcms/cms/issues/15609))
- Fixed a bug where Money fields’ condition rules could display incorrect values based on a user’s formatting locale.
- Fixed an error that occurred when eager-loading user addresses. ([#15629](https://github.com/craftcms/cms/pull/15629))

## 5.3.6 - 2024-08-26

Expand Down
4 changes: 2 additions & 2 deletions src/elements/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,11 @@ public static function eagerLoadingMap(array $sourceElements, string $handle): a
if ($handle == 'addresses') {
$map = (new Query())
->select([
'source' => 'ownerId',
'source' => 'primaryOwnerId',
'target' => 'id',
])
->from([Table::ADDRESSES])
->where(['ownerId' => $sourceElementIds])
->where(['primaryOwnerId' => $sourceElementIds])
->all();

return [
Expand Down