Skip to content
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

BLOB operations in user defined prepared statements are not consistent with operations on entities #20

Open
leitaop opened this issue Oct 12, 2015 · 0 comments

Comments

@leitaop
Copy link
Contributor

leitaop commented Oct 12, 2015

When setting a prepared statement column the following is generally used:
if (o instanceof byte[])
{ ps.ps.setBytes(i, (byte[]) o); }
else
{ ps.ps.setObject(i, o); }
whereas when using entities, values of BLOB columns are always serialized (custom encoded starting in PDB 2.0.5). Therefore, if a BLOB value is updated using an user-defined prepared statement, the written value will not be the returned on subsequent reads. For example, if a byte[] containing a serialized value is written, the read value will not be the provided byte[], it will be the de-serialized object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant