Database column t_node_t_node
cannot be used in JPQL query. JPQL queries operate to entities and their persistent attributes, not with the database tables and columns.
Likely your entity is roughly as follows:
@Entity
public class Node {
@Id private Long id;
@ManyToOne
Node parent;
@OneToMany(mappedBy = "parent")
private List<Node> nodes;
...
}
When id of parent is given, child nodes can be queries as follows:
Long parentId = 1L;
Query q = em.createQuery("SELECT n FROM Node n WHERE n.parent.id = :parentId");
q.setParameter("parentId", parentId);
List<Node> childNodes = q.getResultList();