4

我正在尝试从 Hibernate 切换到 EclipseLink。现在我面临创建 BLOB 的问题。使用 Hibernate,我以这种方式解决了它:

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;
  }

任何提示我如何使用 EclipseLink 做到这一点?(我在 Oracle DB 上)。

强尼

4

0 回答 0