identifyProperty<T, U extends ManagedObject> method
Null safety
- 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 Function(U? x) propertyIdentifier,
) {
final properties = identifyProperties(propertyIdentifier);
if (properties.length != 1) {
throw ArgumentError(
"Invalid property selector. Must reference a single property only.",
);
}
return properties.first;
}