1
I have the following context:
class Entidade1
private Long id;
private int commentId;
private int userId;
class Entidade2
private Long id;
private String descricao;
- I have the following criteria
Criteria criteria = persistence.createCriteria(Entidade2.class);
criteria.add((Restrictions.eq("descricao", "Teste")));
And I need to do the following. return all Entitys2 that satisfy the filter string
Entidade1.commentId != Entidade2.id
and Entidade1.userId = 1
Today I’m doing two for
to solve the problem but not this performatic.
They are not explicitly related entities (attributes annotated with Manytoone, Onetone, etc)?
– mari
There’s no relationship between them
– Luiz Lanza