You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking for feedback, we need to decide how we want to handle/represent fields with default values.
Options:
Try to extract the default value from the org.jooq.Table
Has the advantage that the client code can use the value of the field before the instance is persisted
Is pretty complex, and possibly wouldn't work in all circumstances. The default value is an SQL expression, not sure if it can depend on the other values in the object or even on values in other tables.
Use an Option for the field, and have none indicate a desire to leave the field out
Simple, matches the behaviour of nullable fields
Hard to distinguish from a nullable field
not symmetrical, a fetched row with the default value doesn't look like a new row with the default value
Use an Either[Unit, T] or similar, with the lhs representing a default value and the rhs representing a set value
Seems inelegant
no ability to use the default value before storage
not symmetrical, a fetched row with the default value doesn't look like a new row with the default value
The text was updated successfully, but these errors were encountered:
Looking for feedback, we need to decide how we want to handle/represent fields with default values.
Options:
The text was updated successfully, but these errors were encountered: