From what I read from the docs it looks like MyBatis doesn't support type handling for Postgres Network Address types. It would have been nice if it were a first class JDBC type.
Has anyone tried/written a custom type handler to deal with this? Any suggestions?
Thanks
Stringvs.MACADDRmapping. Retrieval seems to work out-of-the-box. Setting parameter may require a custom type handler. See the demo. If you need further help, please update the question to be more specific.PGObject.Stringis used to store these values in your code, I don't see the point in involvingPGObjectin a type handler, but in any case, there won't be 'native support' from MyBatis unless these network types are added to the JDBC API. In MyBatis users' questions, I rarely see these network address types being used. My guess is that people prefer casting them in SQL rather than writing custom type handler because it's simpler.