When I create a query like this:
Code:
List<Partida> partidas = s.createCriteria(Bulto.class)
.createAlias("partida", "p")
.add(Restrictions.eq("p.producto", prod))
.setProjection(Projections.property("partida"))
.list();
Where Bulto has a property partida and uses lazy loading, It doesn't give me a list of objects of the class "Partida" but a list of some kind of proxies of a class named "Partida_$$_javassist_11".
If I change the mapping file and add ' lazy="false" ' then the same query returns a list of objects of "Partida"
Is there a way to force the query to return the real objects and not some proxy when it is lazily mapped?
Thanks in advance!