Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Problem reading binary data to byte array
Problem reading binary data to byte array [message #1723571] Tue, 16 February 2016 15:50
Antonio Raposo is currently offline Antonio RaposoFriend
Messages: 1
Registered: February 2016
Junior Member
I am having some trouble reading binary data from a table to a byte array. I am using an h2 database where the field is of type LONGVARBINARY and mapping the database with annotations in my classes.
The strange behaviour occurs when I use @Access(AccessType.PROPERTY) but when I use @Access(AccessType.FIELD) everything works as expected, ie, I can get and store the data in the database.
Using @Access(AccessType.PROPERTY) and annotating the getter with @Column I detected that the setter is called three times, The first time with the data and the next two times with null. All other fields (String and int) are also called three times but with the correct values.
I depreend the persistence is creating three objects, but the object it returns to my application has it's data field set to null.

Has anyone else experienced this? Is this a bug? Is there any workarround?
Previous Topic:Stream traversal of lazy loaded collections not working
Next Topic:Reusing Embeddable class - java.lang.OutOfMemoryError: Java heap space
Goto Forum:

Current Time: Sun Mar 07 05:53:38 GMT 2021

Powered by FUDForum. Page generated in 0.01803 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top