use of org.apache.cayenne.map.EntityResult in project cayenne by apache.
the class SelectQueryMetadata method buildEntityIdResultForColumn.
/**
* Collect metadata for result with ObjectId (used for paginated queries with FullObject columns)
*
* @param column full object column
* @param resolver entity resolver
* @return Entity result
*/
private EntityResult buildEntityIdResultForColumn(Property<?> column, EntityResolver resolver) {
EntityResult result = new EntityResult(column.getType());
DbEntity entity = resolver.getObjEntity(column.getType()).getDbEntity();
for (DbAttribute attribute : entity.getPrimaryKeys()) {
result.addDbField(attribute.getName(), attribute.getName());
}
return result;
}
Aggregations