users@glassfish.java.net

Re: Glassfish + TopLink Lazy Loading

From: <glassfish_at_javadesktop.org>
Date: Sat, 01 Aug 2009 12:09:16 PDT

Im having the same exception, plz help me

my bean code

public Grupo buscar(String nome) {
Query query = em.createNamedQuery("Grupo.buscar").setParameter("nome", nome);
Grupo g = (Grupo) query.getSingleResult();
g.getUsuarios().size();
return g;
}

my client-side code, this is after I sucessfully recovered my Grupo instance
List<Usuario> l = (List<Usuario>) grupos.get(i).getUsuarios();

it have ManyToMany relationship

And still doesnt work, what did I miss?

Thanks in advance
[Message sent by forum member 'aleeebr' (aleeebr)]

http://forums.java.net/jive/thread.jspa?messageID=358467