On Tuesday, July 24, 2012 9:48:14 AM UTC-7, binarypaladin wrote: > > This is all working nicely now. Thanks a bunch. That leaves me with one > last question. > > >> Model.db_schema[:id][:type] = nil >> > > What if I want to override that type rather than set it to nil? Would it > be better to use use typecast_on_load with a nil type or can I add a class > method or something to a UUID and set the type UUID and have the > typecasting done that way? >
You can set it to something else, but as we don't have anything internal that typecasts to UUID, you probably won't want to. Overriding the setter method is the preferred way, but you could set it to :uuid and add a Database#typecast_value_uuid method. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/NL_jddCjdmsJ. 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/sequel-talk?hl=en.
