Best way to get BLOB LAZY with Hibernate

I am trying to find the best way to get blob:

  • I found javassit instrumentation

  • Or implementation of FieldHandled

  • Use fake one-to-one mappings instead of properties. Remove the LOB fields from your existig class, create new classes that reference the same table, the same primary key, and only the necessary LOB fields as properties. Specify the mappings as one-to-one, fetch = "select", lazy = "true". While your parent is still in your session, you should get exactly what you want.

Is there any other solution. What is the best aproach?

+4
source share
1 answer

Why not use the standard @Lob annotation, here are the docs . Its standard and portable

+2
source

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


All Articles