2010/3/17 Amit Chakradeo (अमित चक्रदेव) <[email protected]>: > Answering my own question, but the following works: > > class Event <Sequel::Model > self.dataset= self.dataset.order :id > end > But it sounds awkward, there must be a better way...
self.dataset.order!(:id) might work too > --Amit > 2010/3/17 Amit Chakradeo (अमित चक्रदेव) <[email protected]> >> >> Hi, >> I think this is a simple one, but could not figure this out myself. I >> am using the Sequel::Model interface. How do I specify ordering ? >> class Event <Sequel::Model >> order :id >> end >> puts Event.last gives an error Sequel::Error: No order specified >> Event.dataset does not include ORDER BY 'id' clause. >> Thanks! >> Amit >> >> > > -- > You received this message because you are subscribed to the Google Groups > "sequel-talk" 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/sequel-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
