The only way to express that `id` sometimes is nul...
# announcements
a
The only way to express that
id
sometimes is nullabe and sometimes its not is with generics (depends on the Framework, if it supports it). You could separate the DB/Entity-stuff from the Domain stuff and have a
NewMyEntity
without an id and a
MyEntity
with an id and map those to/from your DB-Entity