문제

With request factory you have do define, which enbedded entities should be loaded. This is done by the "with"-keyword. For example if i load an article and i also want the collection of comments stored in the "comments" field, i have to use the following syntax:

ArticleRequest request = requestFactory.articleRequest();
request.findArticleById(1).with("comments");

This works fine. But now i also want to load an Entity stored in the "Comment"-Objects. So every comment references a "User"-entity. If i load my article and comments with the syntax shown above, all "user"-fields are set to "null". How can i tell the request factory to also load sub sub entities?

도움이 되었습니까?

해결책

This should work provided there is a getUser() field in the comment interface:

ArticleRequest request = requestFactory.articleRequest();
request.findArticleById(1).with("comments.user");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top