I have a problem querying an entity with a lob property, thats my entity's
definition :
| @Entity
| public class File{
| @Id @GeneratedValue(strategy=GenerationType.AUTO)
| long code ;
| @ManyToOne
| Person person = null;
| Date timestamp = Calendar.getInstance().getTime();
| String fileName = "";
| @OneToOne
| User creator = null;
| @OneToOne
| User lastUpdater = null;
| String description = "";
| @Lob @Basic(fetch = FetchType.LAZY)
| Blob contents = null;
|
| ...geters/setters
| }
|
and that's the way a query the objects :
List<File> results =entityManager.createQuery(" from File f").getResultList();
entityManager is injected from the seam's context.
I'm using mysql with mysql inno dialect, the query is very very slow and very
memory consuming cause hibernate includes the lob field into the sql.
What am i not doing in the right way?
thanks.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017550#4017550
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017550
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user