Closed arnaudroger closed 5 years ago
@anuraaga so I'm assuming you have a UserProfile object with an id field? what's the type of the id field in the UserProfile object? is it constructor injected? what's the setter or constructor signature? in the jooq query have the field="stellarstationdb"."user"."id" what type and datatype is that?
Thanks for the report. I think it might be a conversion issue but won't know for sure until I can reproduce.
Thanks for filing the issue, sorry for not following up with more details. I'll be able to provide more details about the data structure tomorrow. But thanks to your comment, I can provide some quick details about the code. The mapping code we use is this
It is very common to map into a smaller type from a bigger one so we disabled the property check. But it seems that with the recent change, the accessor exception is being triggered for this case where the target type is smaller than the source. Does this mean we should disable the accessor check too?
Thanks makes a lot of sense. In that case it should call a property not found. I’ll send you the code so that you don’t even have to have an error handler. I don’t think I need more details anymore cheers Sent from my iPhone
On 6 Jan 2019, at 11:38, Anuraag Agrawal notifications@github.com wrote:
Thanks for filing the issue, sorry for not following up with more details. I'll be able to provide more details about the data structure tomorrow. But thanks to your comment, I can provide some quick details about the code. The mapping code we use is this
It is very common to map into a smaller type from a bigger one so we disabled the property check. But it seems that with the recent change, the accessor exception is being triggered for this case where the target type is smaller than the source. Does this mean we should disable the accessor check too?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
just pushed 6.1.1 to maven central should be available in 20-30mn. the fix should restore the previous error handling behavior. you can also use
SfmRecordMapperProviderFactory.newInstance().ignorePropertyNotFound().newProvider();
that will mark any column as optional and not fail if it can't map it.
Thanks for the fix and the sample code!
@anuraaga just created a separate ticket