It would be nice if there could be a generalized way of specifying optionality for fields.
(The first though question is whether the default behavior is consistent -- do all field types equate NULL with their default?)
I pasted the names of all the field types (by listing all Mapped*.class files in target/classes/net/liftweb/mapper). For which of them does it make sense to have optionality, which of them do, and would it make sense to have a trait to mix in or some other consistent way to allow nullablility?
MappedBinary, MappedBirthYear, MappedBoolean, MappedCountry, MappedDate, MappedDateTime, MappedDecimal, MappedDouble, MappedEmail, MappedEnum, MappedEnumList, MappedFakeClob, MappedForeignKey, MappedGender, MappedInt, MappedIntIndex, MappedLocale, MappedLong, MappedLongForeignKey, MappedLongIndex, MappedPassword, MappedPoliteString, MappedPostalCode, MappedString, MappedStringForeignKey, MappedStringIndex, MappedText, MappedTextarea, MappedTime, MappedTimeZone, MappedUniqueId