loadJoin<T extends Entity, D extends JoinRecordData> method
Future<JoinRecord<T, Entity, D>?>
loadJoin<
T extends Entity, D extends JoinRecordData>({ - required String entityName,
- required String entityId,
- required String fieldName,
- String? queryName,
- bool isNullable = false,
- bool isJoinType = false,
- Map<String, Object?>? fixedWhere,
})
Implementation
Future<JoinRecord<T, Entity, D>?> loadJoin<T extends Entity, D extends JoinRecordData>({
required String entityName,
required String entityId,
required String fieldName,
String? queryName,
bool isNullable = false,
bool isJoinType = false,
Map<String, Object?>? fixedWhere,
}) async {
var relatedType = "${entityName}${singularize(fieldName).capitalize()}";
final raw = await this.loadRelatedJson(
entityName: entityName,
entityId: entityId,
fieldName: "${fieldName}Connection",
relatedType: relatedType,
fixedWhere: fixedWhere,
queryName: queryName,
isNullable: isNullable,
isJoinType: isJoinType);
return this._serializer.read<JoinRecord<T, Entity, D>>(
raw,
typeName: relatedType,
isNullable: isNullable,
);
}