Got the following from http://ar.rubyonrails.org (Active Record —
Object-relation mapping put on rails)


------------------- Start ------------------------
Direct manipulation (instead of service invocation)
So instead of (Hibernate example):
   long pkId = 1234;
   DomesticCat pk = (DomesticCat) sess.load( Cat.class, new
Long(pkId) );
   // something interesting involving a cat...
   sess.save(cat);
   sess.flush(); // force the SQL INSERT
Active Record lets you:
   pkId = 1234
   cat = Cat.find(pkId)
   # something even more interesting involving the same cat...
   cat.save
------------------- End ------------------------


I still do not know why my code fails to work when I use script/
runner....

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to