Maybe I'm missing something that was said, but why can't MappedTimestamp extend MappedDate(Time)? Or better yet, provide a trait to mix in with either of the above?
------------------------------------- Peter Robinett<pe...@bubblefoundry.com> wrote: Hi all, As some of you may have noticed, I have been playing around with timestamps[1] and mac addresses[2] in my models. I really like Mapper's specialized fields, both to make it easier for people to read model definitions and to better ensure that only valid values are used along all levels of the service, from the persistence to the presentation layers. So, I would like to propose an effort to develop more specialized fields, starting with MappedTimestamp and MappedMac. I talked to David today and he is willing to provide some advice. Hopefully this will prove a useful way for me to improve my Scala knowledge and contribute to Lift. Focusing just on the two mapped fields I mentioned, do you have any comments how that should be implemented? My thinking is that MappedTimestamp would be stored as a java.util.date and MappedMac as a String, converting both of them to Longs for the database in the interest of saving space. Are there any other mapped fields you'd like to see? I'll add that I think using the units compiler plugin[3] looks cool[4] but probably would be considered to create an unacceptable dependency. Peter Robinett [1]: http://groups.google.com/group/liftweb/browse_thread/thread/b4bdedfb7c935917 [2]: http://groups.google.com/group/liftweb/browse_thread/thread/41650fc1eb0098bd [3]: https://lampsvn.epfl.ch/trac/scala/browser/compiler-plugins/units/trunk [4]: http://www.michaelnygard.com/blog/2009/05/units_of_measure_in_scala.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---