identifyProperty<T, U extends ManagedObject> method
KeyPath
identifyProperty<T, U extends ManagedObject>(
- T propertyIdentifier(
- U? x
Returns a property selected by propertyIdentifier
.
Invokes identifyProperties with propertyIdentifier
, and ensures that a single property
on this entity was selected. Returns that property.
Implementation
KeyPath identifyProperty<T, U extends ManagedObject>(
T propertyIdentifier(U? x)) {
final properties = identifyProperties(propertyIdentifier)!;
if (properties.length != 1) {
throw ArgumentError(
"Invalid property selector. Must reference a single property only.");
}
return properties.first;
}