You are not logged in.
Hi,
When using non nullable types for field definitions, shouldn't the corresponding columns in the tables have the "NOT NULL" constraint by default ? Also, shouldn't the ID column always be "NOT NULL" ?
Offline
Since there won't be any NULL value sent by the ORM, there is little interest of defining such a constraint at SQL level.
Even if NULL are stored in the DB, the ORM would convert them into default values, e.g. 0 or ''.
If you use the RDBMS directly, you may define your own constraints.
But if you rely on the ORM, you can let the ORM do its stuff.
Offline