returningProperties abstract method

void returningProperties(
  1. List propertyIdentifiers(
    1. InstanceType x

Configures the list of properties to be fetched for InstanceType.

This method configures which properties will be populated for InstanceType when returned from this query. This impacts all query execution methods that return InstanceType or List of InstanceType.

The following example would configure this instance to fetch the 'id' and 'name' for each returned 'Employee':

    var q = Query<Employee>()
      ..returningProperties((employee) => [,]);

Note that if the primary key property of an object is omitted from this list, it will be added when this instance executes. If the primary key value should not be sent back as part of an API response, it can be stripped from the returned object(s) with ManagedObject.removePropertyFromBackingMap.

If this method is not invoked, the properties defined by ManagedEntity.defaultProperties are returned.


void returningProperties(List<dynamic> propertyIdentifiers(InstanceType x));