Hi all i'm beginners, i have to do a sort by a fiel in a nested class...i'll explain better. I've a class Node wich have a subclass Category with the following configuration
... @ManyToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE}) @JoinTable( name="category_node", joinColumns={@JoinColumn(name="nodeId")}, inverseJoinColumns={@JoinColumn(name="categoryId")} ) public Set<Category> getCategories() { return categories; } ...
i extract some nodes and i have to order by 'name', a field of Category class. What can i do?i create the Order criteria but i don't know what 'fieldName' i have to use
... Order.asc(fieldName); ...
Sorry for my english, thanks
|