primaryKey top-level constant

const primaryKey = const Column(primaryKey: true, databaseType: ManagedPropertyType.bigInteger, autoincrement: true, validators: const [const Validate.constant()])

Primary key annotation for a ManagedObject table definition property.

This annotation is a convenience for the following annotation:

    @Column(primaryKey: true, databaseType: ManagedPropertyType.bigInteger, autoincrement: true)
    int id;

The annotated property type must be int.

The validator Validate.constant is automatically applied to a property with this annotation.

Implementation

const Column primaryKey = Column(
    primaryKey: true,
    databaseType: ManagedPropertyType.bigInteger,
    autoincrement: true,
    validators: [Validate.constant()])