providerNameForField method

  1. @override
String providerNameForField(
  1. String? annotatedName, {
  2. required SharedChecker<Model> checker,
})

Generate foreign key column if the type is a sibling; otherwise, return the field's annotated name;

Implementation

@override
String providerNameForField(annotatedName, {required checker}) {
  if (checker.isSibling) {
    return InsertForeignKey.foreignKeyColumnName(
      SharedChecker.withoutNullability(checker.unFuturedType),
      annotatedName,
    );
  }

  return annotatedName ?? '';
}