I want to get all the labels belongs to a node, if there a way to do this in one query in SDN 4.0?
For example, my current repo is like
Book findById(Long bookId);
@Query("MATCH (n:Book) where id(n)={0} set n:AnotherLabel return n")
Book updateBookLabel(Long bookId);
is there anyway I can simply
book.getLabels();
to retrieve all the labels for this book node.
the class for book is
@NodeEntity
public class Book extends Something {
}
Yes, by default, my Book node should has two label Book
and Something
.Since I have a update method in the repo to add another label. Anyway I can retrieve the book with all 3 labels?
Thanks