Hi forum,
I currently need to create a new Entity A that associate to an Existing Entity B.
As I only know the primary key of B I'll have to make a A.setB(manager.find(b, B.class));
This is all good except that B is holding a large Blob C which slows down the manager.find command like H...
I have then set the FetchType to LAZY on B like this:
class B{
@Id
private String pkB;
@Lob @Basic(fetch=FetchType.LAZY)
@Column(name="C")
private Serializable c;}
However my createA method is as slow as ever...
This is pretty stupid since I never use the Blob C in the creation.
I merely creates A that associate to B (rather B's key as foreign key) that happens to own C.
[b]Bonus points [/b]to the ones who help solving this weekend puzzle ;-)
Cheers,
[Message sent by forum member 'slingblade' (slingblade)]
http://forums.java.net/jive/thread.jspa?messageID=267733