Basically I would like to do this but I just couldn't find the solution or the keywords.
@EntityView(Location.class)
public interface LocationView {
@IdMapping
int getId();
String getName();
LocationView getParent();
}
Basically I would like to do this but I just couldn't find the solution or the keywords.
@EntityView(Location.class)
public interface LocationView {
@IdMapping
int getId();
String getName();
LocationView getParent();
}
Copyright © 2021 Jogjafile Inc.
Referring to the same view again within a view is not allowed because this circularity makes it necessary that entity views become mutable or that some sort of lazy proxy is introduced.
Think about how you want to model your response as e.g. JSON and the entity view mapping will naturally follow from that, e.g. something like this:
or