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
PgArray does not implement Serializable Interface #726
Comments
Likely because it is not required in the spec. Feel free to provide us with a Pull Request |
@MahatmaFatalError , can you please clarify which MyBatis scenario relies serializable? |
@vlsi please take a look at http://www.mybatis.org/mybatis-3/sqlmap-xml.html#cache as it states "A read-write cache will return a copy (via serialization) of the cached object." Thus, MyBatis caching must be disabled in order to avoid @davecramer ok, I'will give it a try soon |
Here's a quote from the spec
That means, the whole I'm not sure if pgjdbc would be always to keep arrays serializable, so I'm inclined to decline the proposal. |
OK, to avoid this issue I could go by casting the Array to String within the query via array_to_string function and let the caller handle the Just for interest, what would be a good caching mechanism on ORM side for |
It could be like: fetch all the contents, create own implementation of |
Final just for interest question ;) would https://docs.oracle.com/javase/7/docs/api/javax/sql/rowset/serial/SerialArray.html help in this situation in any way? |
Ah, rowset indeed could help here. |
Is there a reason why PgArray does not implement Serializable Interface?
Would be beneficial for some ORM caching mechanisms like MyBatis which relies on serializable objects
The text was updated successfully, but these errors were encountered: