Skip to content

Consider custom conversion in EntityRowMapper and MappingR2dbcConverter #59

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
asavov opened this issue Feb 8, 2019 · 3 comments
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@asavov
Copy link

asavov commented Feb 8, 2019

Reading of Map entity property is intentionally blocked by above line.

How about allowing it and then delegate to the client's custom DBStoredValue-To-Map converter. Similar to:

    static class Config extends AbstractR2dbcConfiguration {

        @Override @Bean public R2dbcCustomConversions r2dbcCustomConversions() {
            ...
            return new R2dbcCustomConversions(
                    storeConversions,
                    Arrays.asList(new JsonStringToMapConverter()));
        }

        class JsonStringToMapConverter implements Converter<String, Map<String, Object>> {
             ...
        }

@asavov
Copy link
Author

asavov commented Feb 8, 2019

Seems kind of related to #39
Still if (property.isMap()) throw new UnsupportedOperationException(); needs special attention which is orthogonal to #39

@mp911de mp911de added type: enhancement A general enhancement status: blocked An issue that's blocked on an external project change labels Feb 8, 2019
@mp911de
Copy link
Member

mp911de commented Feb 8, 2019

The mentioned guard above will be removed with the implementation of #39.

@mp911de mp911de removed the status: blocked An issue that's blocked on an external project change label Mar 11, 2019
@mp911de mp911de added this to the 1.0 M2 milestone Mar 11, 2019
@mp911de mp911de changed the title Reading of Map property is not supported by EntityRowMapper Consider custom conversion in EntityRowMapper and MappingR2dbcConverter Mar 12, 2019
mp911de added a commit that referenced this issue Mar 12, 2019
MappingR2dbcConverter now considers custom conversions for inbound and outbound conversion of top-level types (Row to Entity, Entity to OutboundRow) and on property level (e.g. convert an object to String and vice versa).
mp911de added a commit that referenced this issue Mar 12, 2019
MappingR2dbcConverter now considers custom conversions for inbound and outbound conversion of top-level types (Row to Entity, Entity to OutboundRow) and on property level (e.g. convert an object to String and vice versa).
@mp911de mp911de self-assigned this Mar 12, 2019
mp911de added a commit that referenced this issue Mar 18, 2019
MappingR2dbcConverter now considers custom conversions for inbound and outbound conversion of top-level types (Row to Entity, Entity to OutboundRow) and on property level (e.g. convert an object to String and vice versa).
schauder pushed a commit that referenced this issue Mar 19, 2019
schauder pushed a commit that referenced this issue Mar 19, 2019
MappingR2dbcConverter now considers custom conversions for inbound and outbound conversion of top-level types (Row to Entity, Entity to OutboundRow) and on property level (e.g. convert an object to String and vice versa).

Original pull request: #70.
@mp911de
Copy link
Member

mp911de commented Mar 25, 2019

That's in place now.

@mp911de mp911de closed this as completed Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants