ManagedDataModelException.noPrimaryKey(ManagedEntity entity)

Source

factory ManagedDataModelException.noPrimaryKey(ManagedEntity entity) {
  return new ManagedDataModelException(
      "Class '${_getPersistentClassName(entity)}'"
      " doesn't declare a primary key property. All 'ManagedObject' subclasses "
      "must have a primary key. Usually, this means you want to add '@managedPrimaryKey int id;' "
      "to ${_getPersistentClassName(entity)}, but if you want more control over "
      "the type of primary key, declare the property as one of "
      "${ManagedPropertyDescription.supportedDartTypes.join(", ")} and "
      "add '@ManagedColumnAttribute(primaryKey: true)' above it.");
}