name
column as String. Clear will map automatically the column to the model attribute. description
. We defined description
as NULLABLE
in our database. To reflect this choice, we add Nilable
?
operator to our column.id
as our primary key for this model. While being declared as NOT NULL
, the column is defined with a default value in PostgreSQL. Therefore, we tell Clear to not check value presence on save/validate by adding presence: false
to the column definition.articles
).self.table
: