-
Notifications
You must be signed in to change notification settings - Fork 11
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
Wrong decode mechanism when using custom AbstractCodec based on field type #35
Comments
Was working fine in 0.2.0 version of your lib. I don't know with you dont pass anymore the field type but Object.class when you row.get ? |
Thanks for your report. Could you please provide a code sample that demonstrates the issue?
I cannot remember. We had some issues in data conversion. But maybe this was an unnecessary change. |
Well a bit difficult to reproduce it fast, but it's linked to the fact that when we create a new domain extension with jooq we only need to register a org.jooq.Converter. public final TableField<ReceiptInvoiceAddressRecord, Locale> COUNTRY = createField(DSL.name("country"), org.jooq.impl.SQLDataType.VARCHAR(10).nullable(false), this, "", new CountryConverter()); in blocking jooq CountryConverter is enough and a META-INF/services io.r2dbc.postgresql.codec.LocaleCodecRegistrar Seems that ReactiveJooq don't work OOTB with extras org.jooq.Converter |
In fact, i got a workaround for my case, i registered my codec FIRST and since it was handling Object.class types (+ other types) , he was overriding behaviour for decoding basic string. To solve my case, i just registered my codec in latest position |
spring-boot-data-r2dbc-jooq/src/main/java/gofabian/r2dbc/jooq/RowConverter.java
Line 25 in 49e1ebe
since you always decode an object with the target Object.class type, io.r2dbc.postgresql.codec.AbstractCodec doesn't work anymore with extra registred codec based on this implementation since io.r2dbc.postgresql.codec.AbstractCodec#canDecode is based on field type and you always pass Object.class type.
The text was updated successfully, but these errors were encountered: