belongsTo method

Future belongsTo(
  1. A model
)

B

Implementation

Future<dynamic> belongsTo(A model) async {
  String? modelBId = model.getData(key: '${id}_id');

  if (modelBId == null) {
    return null;
  }

  var result = await Collection.get(modelType: B).getModel(modelBId);

  return result;
}