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
NullPointerException on Deserialization of a QTuple #676
Comments
Deserialization seems to crash with RelationalPathBase.columnMetadata creation |
The implemention with the eager calculation is not optimal from a performance point of view, but it is stable and simple. Feel free to suggest alternatives. Returning -1 for mixin == null will not work, since this will create changing hash codes. The mixin field will be populated after the object has been fully populated. |
I didn't understand completly your response. If understand #676 solve this issue, right? |
Both your patch and my commit provide a solution
With eager calculation I mean the calculation in the constructor which has the benefit that the hashCode will be directly available when deserialized, and it will be the correct one. Returning -1 for the hashCode has the problem that this will corrupt usage as the hashCode changes when the object is fully initialized. |
Imho, this is a good solution at now. |
Released in 3.3.2 |
in #640 was solved QTuple SerializationException but I've seen now that Deserialization (of QTuple) is not working cause a null pointer on DslExpression class calling hashCode method.
I've patch myself the DslExpression class changing hashCode method like this...
I can't figure out if this is the right behavior but it works. Please consider if this can be integrated in your code (or if there is a cleaner approach).
Can you add to your serialization method used on tests also deserialization, something like this?
The text was updated successfully, but these errors were encountered: