Relations
@orm
@serializable
abstract class _Wheel extends Model {
@belongsTo
Car get car;
}@BelongsTo(localKey: 'carId', foreignKey: 'licenseNumber')
Car get car;Many-to-many Relationships
Last updated
@orm
@serializable
abstract class _Wheel extends Model {
@belongsTo
Car get car;
}@BelongsTo(localKey: 'carId', foreignKey: 'licenseNumber')
Car get car;Last updated
@orm
@serializable
abstract class _Class extends Model {
String get courseName;
@ManyToMany(_Enrollment)
List<_Student> get students;
}
@orm
@serializable
abstract class _Student extends Model {
String get name;
int get year;
@ManyToMany(_Enrollment)
List<_Class> get classes;
}
@orm
@serializable
abstract class _Enrollment {
@belongsTo
_Student get student;
@belongsTo
_Class get class_;
}