Hello,
I'm migrating from 3.1 to 3.6 and have a problem to retrieve BLOB object, can't compile the following code, which works fine in 3.1:
[code] Query q = session.createSQLQuery("select data from table") .addScalar("data", Hibernate.BLOB); List<Object[]> results = q.list(); Object[] first = results.get(0); SerializableBlob blob = (SerializableBlob)first[0]; ObjectInputStream ois = new ObjectInputStream( blob.getBinaryStream()); ArrayList dataList = (ArrayList)ois.readObject(); [/code]
SerializableBlob not found. Can anyone give a hint or better an example how to retrieve blobs in hibernate 3.6 using queries and scalars? I can't find any example of SerializableBlobProxy, any help would be appreciated.
Thanks in advance and best regards, Ian
|