ManagedDataModelException.dualMetadata(ManagedEntity entity, Symbol property, ManagedEntity destinationEntity, Symbol inverseProperty)

Source

factory ManagedDataModelException.dualMetadata(
    ManagedEntity entity,
    Symbol property,
    ManagedEntity destinationEntity,
    Symbol inverseProperty) {
  return new ManagedDataModelException("Relationship '${_getName(property)}' "
      "on '${_getPersistentClassName(entity)}' "
      "and '${_getName(inverseProperty)}' "
      "on '${_getPersistentClassName(destinationEntity)}' "
      "both have 'ManagedRelationship' metadata, but only one side can. "
      "The property with 'ManagedRelationship' metadata is actually a foreign key column "
      "in the database. The other one isn't a column, but an entire row or rows."
      "Ask yourself which makes more sense: "
      "\"${_getInstanceClassName(entity)}.${_getName(property)} has "
      "${_getInstanceClassName(destinationEntity)}.${_getName(inverseProperty)}\" "
      "or \"${_getInstanceClassName(destinationEntity)}.${_getName(inverseProperty)} has "
      "${_getInstanceClassName(entity)}.${_getName(property)}\"? If it is the first,"
      "keep the metadata on "
      "${_getInstanceClassName(destinationEntity)}.${_getName(inverseProperty)} "
      "otherwise, delete that metadata.");
}