Skip to content

Conversation

@schauder
Copy link
Contributor

@schauder schauder commented May 2, 2024

Let the AggregateReference converters now receive also custom converters as delegates.
Remove the ArrayToObjectConverter which just uses the first element of the array from the DefaultConversion service.

Closes #1750

@schauder schauder force-pushed the issue/1750-custom-converters-for-aggregateref branch from d306084 to 7c3a092 Compare May 7, 2024 12:31
schauder added 2 commits May 7, 2024 15:27
Let the AggregateReference converters now receive also custom converters as delegates. Remove the ArrayToObjectConverter which just uses the first element of the array from the DefaultConversion service. This does NOT solve the underlying problem, of having two DefaultConversionServices at work. One is in the store conversion, one constructed in the AbstractRelationalConverter. Although it looks like they get merged, the former contains converters, using that ConversionService as a delegate. Attempts were made to move AggregateReferenceConverters out of the store converters and just register them directly, but then no custom read/write targets are detected, leading to failed conversions. The same problem prevents a registration in CustomConversions as a Function<ConversionService, GenericConverter> or similar, which would allow late registration. The problem here is that custom read/write targets require the function to get evaluated, before custom read/write targets can be determined. Closes #1750
Remove redundant code. See #1750
@schauder schauder force-pushed the issue/1750-custom-converters-for-aggregateref branch from 7c3a092 to 6d5b727 Compare May 7, 2024 13:28
@mp911de mp911de changed the title Fix problems with reading converters. Reuse custom converters from AggregateReferenceConverters May 15, 2024
@mp911de mp911de added this to the 3.2.6 (2023.1.6) milestone May 15, 2024
mp911de pushed a commit that referenced this pull request May 15, 2024
Let the AggregateReference converters now receive also custom converters as delegates. Remove the ArrayToObjectConverter which just uses the first element of the array from the DefaultConversion service. This does NOT solve the underlying problem, of having two DefaultConversionServices at work. One is in the store conversion, one constructed in the AbstractRelationalConverter. Although it looks like they get merged, the former contains converters, using that ConversionService as a delegate. Attempts were made to move AggregateReferenceConverters out of the store converters and just register them directly, but then no custom read/write targets are detected, leading to failed conversions. The same problem prevents a registration in CustomConversions as a Function<ConversionService, GenericConverter> or similar, which would allow late registration. The problem here is that custom read/write targets require the function to get evaluated, before custom read/write targets can be determined. Closes #1750 Original pull request: #1785
mp911de added a commit that referenced this pull request May 15, 2024
mp911de added a commit that referenced this pull request May 15, 2024
Reduce test element visibility. See #1750 Original pull request: #1785
mp911de pushed a commit that referenced this pull request May 15, 2024
Let the AggregateReference converters now receive also custom converters as delegates. Remove the ArrayToObjectConverter which just uses the first element of the array from the DefaultConversion service. This does NOT solve the underlying problem, of having two DefaultConversionServices at work. One is in the store conversion, one constructed in the AbstractRelationalConverter. Although it looks like they get merged, the former contains converters, using that ConversionService as a delegate. Attempts were made to move AggregateReferenceConverters out of the store converters and just register them directly, but then no custom read/write targets are detected, leading to failed conversions. The same problem prevents a registration in CustomConversions as a Function<ConversionService, GenericConverter> or similar, which would allow late registration. The problem here is that custom read/write targets require the function to get evaluated, before custom read/write targets can be determined. Closes #1750 Original pull request: #1785
mp911de added a commit that referenced this pull request May 15, 2024
mp911de added a commit that referenced this pull request May 15, 2024
Reduce test element visibility. See #1750 Original pull request: #1785
@mp911de
Copy link
Member

mp911de commented May 15, 2024

That's merged, polished, and backported now.

@mp911de mp911de closed this May 15, 2024
@mp911de mp911de deleted the issue/1750-custom-converters-for-aggregateref branch May 15, 2024 12:57
@mp911de mp911de added the type: bug A general bug label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

3 participants