Open jianglibo opened 7 years ago
look into the code, this is where links and meta be discarded:
@Override
public ResourceList<D> findManyTargets(I sourceId, String fieldName, QuerySpec querySpec) {
MultivaluedMap<I, D> map = findTargets(Arrays.asList(sourceId), fieldName, querySpec);
if (map.isEmpty()) {
return new DefaultResourceList<>();
}
return (ResourceList<D>) map.getList(sourceId);
}
This method always call "findTargets" with one unique sourceId, why does it need filter out mata information from it? /sections/1/articles, this kind of relationship is very common. without the mata information, it need to construct the url manually. like /articles?filter[section]=1
Katharsis doesn't return meta info when fetching relations. I'm not sure whether it follows the jsonapi spec. for example:
If there were thousands of comments for that article, should I return them all? or be paged? I just count this problem today.