loadJoin<T extends Entity, D extends JoinRecordData> method

Future<JoinRecord<T, Entity, D>?> loadJoin<T extends Entity, D extends JoinRecordData>({
  1. required String entityName,
  2. required String entityId,
  3. required String fieldName,
  4. String? queryName,
  5. bool isNullable = false,
  6. bool isJoinType = false,
  7. 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,
      );
}