Friends,
I have a problem with Lazy Loading. Our plataform donĀ“t support (Flex / BlazeDS).
Can u help me to mount this query?
1 Atendimento have 1 collection of ExameServico. OneToMany
1 ExameServico have 1 Exame only.
I need to bring: "protocolo" of Atendimento,
Atendimento collection of ExameServico (only the dataExameServico),
and each Exame of ExameServico Collection (only nome).
Code:
public class Atendimento {
@Id
@GeneratedValue
private long id;
@OneToMany(fetch = FetchType.LAZY)
private List<ExameServico> exames;
private String protocolo;
// getters e setters
}
Code:
public class ExameServico {
@Id
@GeneratedValue
private long id;
@ManyToOne
private Exame exame;
private Date dataExameServico;
// getters e setters
}
Code:
public class Exame {
@Id
@GeneratedValue
private long id;
private String nome;
// getters e setters
}
Sorry about english.