From: Sharon Rosner Date: 2007-10-23T15:27:41+09:00 Subject: Re: How do I save a row update using Sequel? On Oct 22, 11:14 pm, Chuck Remes wrote: > I really like the simplicity of Sequel [1], but right now it is > giving me fits. After I insert a row into the database, I can't seem > to get it to persist any updates that I make to that row. Here's an > example. Hi Chuck. You can post questions about Sequel to the sequel-talk group: http://groups.google.com/group/sequel-talk?hl=en Regarding your problem, when you get back records as a bunch of hashes from a dataset, you can't update them, they're just stupid Ruby hashes that don't know anything about databases. What you should use is the Sequel model class, which knows about primary keys and all that stuff. Here's an example: class TestItem < Sequel::Model(:test_table) # in order to be able to update records you must use # some kind of primary key. By default the primary # key is :id, but you can set it to anything you want # including composite primary keys. set_primary_key :a end TestItem.create(:a => 'sample1', :b => 'sample2') t = TestItem.order(:b).last t.set(:c => 'sample3') best Sharon