1. @override
bool isAssignableWith(dartValue)

Whether or not a the argument can be assigned to this property.

Source

@override
bool isAssignableWith(dynamic dartValue) {
  var type = reflect(dartValue).type;

  if (type.isSubtypeOf(reflectType(List))) {
    if (relationshipType != ManagedRelationshipType.hasMany) {
      throw new ManagedDataModelException(
          "Trying to assign List to relationship that isn't hasMany for ${MirrorSystem.getName(entity.persistentType.simpleName)} $name");
    }

    type = type.typeArguments.first;
    if (type == reflectType(dynamic)) {
      // We can't say for sure... so we have to assume it to be true at the current stage.
      return true;
    }
  }

  return type == destinationEntity.instanceType;
}