I''m revamping an app I wrote a couple months ago and have just discovered that I cannot set the id of new or existing objects. [aegis:~] ryan% cd /tmp/ [aegis:/tmp] ryan% rails test [aegis:/tmp] ryan% cd test [aegis:/tmp/test] ryan% ./script/generate scaffold_resource blah id:integer title:string [aegis:/tmp/test] ryan% rake db:migrate [aegis:/tmp/test] ryan% ./script/console Loading development environment.>> blah = Blah.create >> blah.id = 500=> 500>> blah.save=> true>> blah.reloadActiveRecord::RecordNotFound: Couldn''t find Blah with ID=500>> Blah.find(:first).id=> 1 When did id become protected and unmodifiable? I know for certain that I *used* to be able to set the id of objects, as I have a table full of examples where this was successfully done. I''m also fairly certain I didn''t have to jump through any hoops to get that behavior... Is it simply impossible to set the id of an object now? I can sort of see why this is a desirable default, but is there some way to override that behavior in my models? If not, that''s unfortunate, as I now have to go mucking with a bunch of other code that I had hoped to leave be. -- Ryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---