I tried using non-integer keys a while back and eventually gave up. I half got it working, but there were numerous issues. This is something I'd really like to get working properly in 3.2.
On Fri, 2011-07-08 at 12:02 -0700, Aaron Patterson wrote: > On Fri, Jul 08, 2011 at 10:37:50AM -0700, Luis Correa d'Almeida wrote: > > In ActiveRecord 3.1.0.rc4, setting the id manually no longer works - > > the assignment seems to be ignored. Is this expected behavior? Seems > > to break BC > > > > create_table :posts, :id => false do |t| > > t.string :id, :limit => 36, :primary => true, :null => false > > t.string :title > > end > > > > > @post = Post.new > > > @post.id = "abc123" > > > @post.id > > => nil > > > > > @post.save! > > => Fails because id is nil/null (obviously) > > > > Thoughts? > > If it worked in 3.0.9, but doesn't work in 3.1.0, please file a ticket > (along with a test case if you can). In this case, I think it's likely > this behavior was undefined (had no test case). At the very least we > should add a test case that specs the behavior for this. > -- http://jonathanleighton.com/
signature.asc
Description: This is a digitally signed message part
