Creating BLOBs with EclipseLink

I am trying to switch from Hibernate to EclipseLink. Now I am faced with the problem of creating a BLOB. With Hibernate, I solved it like this:

import org.hibernate.LobHelper; import org.hibernate.classic.Session; ... public Blob createBlob(InputStream inputStream, long length) { Session session = entityManager.unwrap(Session.class); LobHelper lobHelper = session.getLobHelper(); Blob blob = lobHelper.createBlob(inputStream, length); return blob; } 

Any hints how can I do this with EclipseLink? (I am in Oracle DB).

Johnny

+4
source share

Source: https://habr.com/ru/post/1435240/


All Articles