returningProperties method Null safety
- List propertyIdentifiers(
- InstanceType x
Configures the list of properties to be fetched for
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
The following example would configure this instance to fetch the 'id' and 'name' for each returned 'Employee':
var q = Query<Employee>() ..returningProperties((employee) => [employee.id, employee.name]);
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));