As a follow-up, how does one make an Integer column not_null default 0? Looks like not_null for text columns is with :length => 1..999 vs. 0..
I don't want to validate it's existence on setting, I just want to force the value to be 0 after its been created. -Kevin On May 27, 1:46 pm, Jonathan Stott <[email protected]> wrote: > 1. Enum Type > > I'm not sure about this. It might be possible via subclassing though, > as suggested. > > 2. unsigned smallint > > property :little_counter, Integer, :min => 0, :max => 65535 > > DataMapper automigrates to use the smallest column typeit can, if a > min and max are specified. If the minimum is >= 0, it makes an > UNSIGNED column, and the max, determines the size needed to use. > DataMapper does its best to map the properties you specify onto the > data-store, but you need to give it some clues. > > Regards > Jon -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
