-
1. Re: Lazy byte array gets loaded on query
stnor Sep 22, 2006 7:54 AM (in response to agnadello)Hi Andreas,
It's really necessary, but unfortunately, I didn't manage to get the byte code build-time instrumentation to help either. I currently use non-FK id:s for blobs as a workaround, which sucks.
I think @Lob and FetchType.LAZY is broken.
Stefan -
2. Re: Lazy byte array gets loaded on query
agnadello Sep 22, 2006 8:05 AM (in response to agnadello)Hi Stefan and thanks for your answer!
So, creating another table for the blob and referencing it from my Appendix entity is the way to do it right now? That sucks! :-(
Well, I hope they fix it soon...
Thank you anyways!
Regards, Andreas -
3. Re: Lazy byte array gets loaded on query
agnadello Sep 25, 2006 3:07 PM (in response to agnadello)Solved it!
Using a java.sql.Blob instead of byte array.
Strange, because the docs says you could use both?!
Anyways, problem has vanished :-)
Cheers! -
4. Re: Lazy byte array gets loaded on query
dguralnik Apr 15, 2007 7:38 AM (in response to agnadello)Hello,
I've got the same problem. But switching to a Blob attribute didn't help:
it is still loading BLOB column in a query!
I played with hibernate.bytecode.use_reflection_optimizer but got the same result.
Another idea was calling hibernate's javassist instrument task during building the application. It affected the exception during deploying:
javax.persistence.PersistenceException: org.hibernate.MappingException: Could no
t determine type for: org.hibernate.bytecode.javassist.FieldHandler, for columns
: [org.hibernate.mapping.Column(fieldHandler)]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
figuration.java:698)
Any ideas?
Thank you. -
5. Re: Lazy byte array gets loaded on query
deanouk Jan 30, 2009 5:02 AM (in response to agnadello)We're also puzzled by this.
Even with the lazy load and lob annotation a byte array is still eagerly loaded... -
6. Re: Lazy byte array gets loaded on query
jaikiran Jan 30, 2009 5:13 AM (in response to agnadello)I guess you might find some help in the Hibernate forums, because JBoss JPA uses Hibernate as its implementation.