tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: Hibernate Vs OpenJPA
Date Tue, 24 Sep 2013 13:12:26 GMT
In Hibernate 

@Basic(fetchType=LAZY)
byte[] image;

public byte [] getImage() {return image;}

in OpenJPA and eclipselink you will get some 'enhance' classes which will do kind of

byte[] image;
public byte[] getImage() {
  if (!imageLoaded()) {
   image = loadImage();
  }
  return image;

}


Means in OpenJPA and EclipseLink, lazy loading does work. In Hibernate it does not.

A few years ago I wrote a blog post about it [1]. Maybe this helps.


LieGrue,
strub

[1] http://struberg.wordpress.com/2012/01/08/jpa-enhancement-done-right/





>________________________________
> From: mauro2java2011 <mauro2java2011@gmail.com>
>To: users@openejb.apache.org 
>Sent: Tuesday, 24 September 2013, 14:49
>Subject: Re: Hibernate Vs OpenJPA
> 
>
>1) so into hibernate bytes [] iti s eager loading??
>
>2)But if hibernate not use weaving, whi OpenJPA and Eclipse-link use
>weaving??
>
>3) What then  is the advantage of using  OpenJPA or Eclipse-link instead of
>hibernate?
>In my opinion only complicate things ...
>
>
>
>
>
>
>
>--
>View this message in context: http://openejb.979440.n4.nabble.com/Hibernate-Vs-OpenJPA-tp4665234p4665251.html
>Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>
>

Mime
View raw message