Skip to content

Fix usage of wrong id value in related selects #1810

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

Closed
wants to merge 2 commits into from

Conversation

schauder
Copy link
Contributor

@schauder schauder commented Jun 7, 2024

In an aggregate A->B-Collection a select gets executed for loading Collection.
That select used the wrong ID when B had an ID with the same name as A.

This is now fixed.

Closes #1802

schauder added 2 commits June 7, 2024 09:36
In an aggregate A->B-Collection<C> a select gets executed for loading Collection<C>.
That select used the wrong ID when B had an ID with the same name as A.

This is now fixed.

Closes #1802
@charliemidtlyng
Copy link

This is an important fix for us @ma10s - in order to upgrade https://github.com/navikt/familie-tilbake/

Fixing our issue with the relations A->B[]->C->D[] where the content of D is empty after a fetch.

@mp911de mp911de self-assigned this Jun 10, 2024
@@ -467,6 +467,20 @@ void getEffectiveIdColumnName() {
});
}

@Test // GH-1802
void dingens() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dingens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry. I thought gave that thing a proper name 😢

@mp911de mp911de added this to the 3.2.7 (2023.1.7) milestone Jun 10, 2024
@mp911de mp911de added the type: regression A regression from a previous release label Jun 10, 2024
mp911de pushed a commit that referenced this pull request Jun 10, 2024
In an aggregate A->B-Collection<C> a select gets executed for loading Collection<C>.
That select used the wrong ID when B had an ID with the same name as A.

This is now fixed.

Closes #1802
Original pull request: #1810
mp911de added a commit that referenced this pull request Jun 10, 2024
Simplify code. Remove redundant calls.

Reformat code, remove trailing whitespaces, remove duplicate tests.

See #1802
Original pull request: #1810
mp911de pushed a commit that referenced this pull request Jun 10, 2024
In an aggregate A->B-Collection<C> a select gets executed for loading Collection<C>.
That select used the wrong ID when B had an ID with the same name as A.

This is now fixed.

Closes #1802
Original pull request: #1810
mp911de added a commit that referenced this pull request Jun 10, 2024
Simplify code. Remove redundant calls.

Reformat code, remove trailing whitespaces, remove duplicate tests.

See #1802
Original pull request: #1810
mp911de pushed a commit that referenced this pull request Jun 10, 2024
In an aggregate A->B-Collection<C> a select gets executed for loading Collection<C>.
That select used the wrong ID when B had an ID with the same name as A.

This is now fixed.

Closes #1802
Original pull request: #1810
mp911de added a commit that referenced this pull request Jun 10, 2024
Simplify code. Remove redundant calls.

Reformat code, remove trailing whitespaces, remove duplicate tests.

See #1802
Original pull request: #1810
@mp911de
Copy link
Member

mp911de commented Jun 10, 2024

That's merged, polished, and backported now.

@mp911de mp911de closed this Jun 10, 2024
@mp911de mp911de deleted the issue/1802-set-chain branch June 10, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fetching an aggregate root-entity-set chain results in wrong data for the set
3 participants