I had a bunch of optional=false for some of my relations and I decided for the rest of them to make it explicit that they were optional with an optional=true. This should have no effect because optional=true is the default.
However, with optional=true, Cuba-Platform changes the database field to “not null” (i.e. not optional).
Possibly the code is just looking to see if there’s an optional annotation attribute as opposed to looking at what the value of it is.