Skip to content

Generating ORM for simple table

Ravi Teja Gudapati edited this page Sep 25, 2018 · 7 revisions

Lets generate Bean for this simple model:

class User {
  @PrimaryKey(auto: true, isNullable: false)
  int id;

  String name;

  int age;

  User({this.id, this.name, this.age});
}

As you have noticed, the field id is declared as non-nullable, auto-incremented primary key.

TODO

Clone this wiki locally