angel-dart-archive / orm

moved to angel-dart/angel/packages/orm

Home Page:https://github.com/angel-dart/angel/tree/master/packages/orm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow specifying the type of join in a relation

thosakwe opened this issue · comments

As it is currently, all relations produce left joins. Perhaps there can be a field in the @Relationship annotation describing with type of Join to use.

Example:

@serializable
@orm
class _Book extends Model {
  @BelongsTo(joinType: JoinType.inner)
  _Author author;

  @BelongsTo(localKey: "partner_author_id")
  _Author partnerAuthor;

  String name;
}