// Register the result types of the query; Currently either a number of scalar values or an entity return
// are supported only; JP-QL would actually a combination of both, though (see OGM-514)
if ( result.getProjection() != null ) {
for ( String field : result.getProjection().keySet() ) {
query.addScalar( field );
}
}
else {
query.addEntity( result.getEntityType() );
}