Open kaqqao opened 4 years ago
I would note a few points:
So at the end 1 is a good option/feature and 2/3 means the root cause is a bug in MP IMHO so we can also just not do anything at jsonb level if mp is cleaned up
It doesn't have to exist. We'd just like to have a way to respect it if does. It's true that there could be an environmental config instance, but
a) There isn't, and changing every MP impl out there isn't a reasonable expectation either
b) The proposed feature would be useful regardless, as it is in no way tied to our use-case.
I think the overall usecase is reasonable to support. We should document that originalJsonb.getConfig()
returns a COPY of the JsonbConfig
though, so that it's clear the configuration for originalJsonb
won't be impacted by the subsequent configuration.
Note: Implementations would only performa a full clone, because we would not be able to automatically clone Adapters/Serializers/Deserializers
Side note: isnt it weird to not respect jsonbproperty which is part of the platform in mp-graphql?
@rmannibucau It does respect @JsonbProperty
. This whole thing is exactly about fully respecting all Jsonb settings. The user just has an option of renaming the fields in the GraphQL schema (effectively by changing the naming strategy under the hood). And this is something the users themselves have to do, nothing happens by itself. So any potential inconsistencies are no different than what you can normally get into when using Jsonb.
If so, you dont have any need of this ticket or it is vendor specific, right?
It is occasionally necessary to clone an existing
Jsonb
instance, and optionally override a specific setting. Would it be possible to add a method likeJsonb#getConfig
that returnsJsonbConfig
?Usage example
(I replaced the example. The original was drawing attention away from the central point.)