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

Methods for custom mapping setup #111

Open
bitgorbovsky opened this issue Sep 19, 2022 · 1 comment
Open

Methods for custom mapping setup #111

bitgorbovsky opened this issue Sep 19, 2022 · 1 comment
Labels
feature A new functionality triage

Comments

@bitgorbovsky
Copy link

bitgorbovsky commented Sep 19, 2022

There is no functionality for setting custom mappings on springdata level. It would be nice to have such possibility, for example, I want to map some flat structure (e.g tuple, and perhaps, nested tuples) with some classes (it's usually called unflattening).

@bitgorbovsky bitgorbovsky added the feature A new functionality label Sep 19, 2022
@akudiyar
Copy link
Collaborator

The built-in extension points for Spring Data converters (Java type to Java type) are available, look: https://github.com/tarantool/cartridge-springdata/blob/master/src/main/java/org/springframework/data/tarantool/config/AbstractTarantoolDataConfiguration.java#L211. Probably we are lacking a test for it and a link to the Spring Data doc about that in our README.

As for the MessagePack to Java type conversions, the users are supposed to use the TarantoolConfig: https://github.com/tarantool/cartridge-springdata/blob/master/src/main/java/org/springframework/data/tarantool/config/AbstractTarantoolDataConfiguration.java#L93 and https://github.com/tarantool/cartridge-java/blob/master/src/main/java/io/tarantool/driver/api/TarantoolClientConfig.java#L353 - they are supposed to provide a custom MessagePackMapper instance with their custom converters. Probably we need to update the driver version in the module and add the relevant section in the README.

Is that what you had in mind or something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality triage
Projects
None yet
Development

No branches or pull requests

3 participants