tarantool / cartridge-springdata

Spring Data Tarantool
Other
18 stars 7 forks source link

Problem using @ReadingConverter and @WritingConverter converters in catridge-springdata #130

Open Alexander-1703 opened 1 year ago

Alexander-1703 commented 1 year ago

Hello!

I noticed that when adding a converter to customConverters in catridge-springdata, it works both for reading and writing. The @ReadingConverter/@WritingConverter annotations are marker annotations and currently there is no code in the connector that processes them. Instead, the built-in Spring Data mechanism is used, which determines the converter by the target type, so the converters of the MyClass -> MyClass type work both ways.

I would like to know if there is a way to create a converter that will be read-only or write-only. If there is no such possibility, maybe it can be considered as a suggestion for future improvements.