Oh and what I also wanted to ask is: is there a way to define a DM property that will generate a 'time' instead of 'timestamp' in a Postgresql db? Since DM Time = psql Timestamp, there doesn't seem to be an obvious way.
On Sunday, November 18, 2012 5:31:40 PM UTC+1, manu wrote: > > Hey folks > > One of my models has a "flight_time" property that I use to store how long > - in hours and minutes of elapsed time - a flight took. > > I defined it as a DataMapper 'Time' property since that's the closest > match I could find... > > As I use Postgresql, it basically translates that into a "timestamp > without time zone" TYPE. > > Only now I realise "how the hell am I going to manipulate this", e.g. > adding the total flight time of the last 10 flights. manipulating psql > timestamps can be quite mindboggling given what I'm trying to achieve. > > Was this a Very Bad Idea? Should I have used two integer values e.g. > elapsed_hrs and elapsed-minutes? > > Thanks for your help. > -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To view this discussion on the web visit https://groups.google.com/d/msg/datamapper/-/a5Te5YDTkkkJ. 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.
