loadBy<T extends Entity> method
Loads the first entity of the given AND criteria.
- By AND, we mean it satisfies all values in
whereValues
. -
option
- whether to useforShare
,forUpdate
- or null (default; no lock).
Implementation
Future<T?> loadBy<T extends Entity>(
Iterable<String>? fields, T newInstance(String oid),
Map<String, dynamic> whereValues, [AccessOption? option])
=> loadWith(fields, newInstance,
sqlWhereBy(whereValues, "limit 1"), whereValues, null, null, option);