ReferenceName class

Annotation to use on reference columns inside of a Table to define the name that the manager will use when refering to this relation in the reverse.

Example:

class TodoEntries extends Table {
  IntColumn get id => integer().autoIncrement()();
  TextColumn get body => text()();
  @ReferenceName("categories")
  IntColumn get category => integer().nullable().references(Categories, #id)();
}
class Categories extends Table {
  IntColumn get id => integer().autoIncrement()();
}
/// The manager will now use the name `categories`
categories.filter((f) => f.categories((f) => f.body("Todo")))

When these aren't specified, the manager will use the referenced tables name followed by Refs. If a reference name clashes with other fields on the table, the generator will show a warning, and filters and orderings wont be generated

Constructors

ReferenceName(String name)
Annotation to use on reference columns inside of a Table to define the name of the filters and orderings for the reverse relation.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The name that this reference will use when generating filters and ordering in the reverse direction for ReferenceName for details.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited