diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 68908acebd..20b5a7265a 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Clearer has_one/belongs_to model names (account has_one :user). #5632 [matt@mattmargolis.net] + * Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. #5635 [schoenm@earthlink.net] * Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net] diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index bf03a9bf1a..722f78596c 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -118,25 +118,27 @@ module ActiveRecord # Both express a 1-1 relationship, the difference is mostly where to place the foreign key, which goes on the table for the class # saying belongs_to. Example: # - # class Post < ActiveRecord::Base - # has_one :author + # class User < ActiveRecord::Base + # # I reference an account. + # belongs_to :account # end # - # class Author < ActiveRecord::Base - # belongs_to :post + # class Account < ActiveRecord::Base + # # One user references me. + # has_one :user # end # # The tables for these classes could look something like: # - # CREATE TABLE posts ( + # CREATE TABLE users ( # id int(11) NOT NULL auto_increment, - # title varchar default NULL, + # account_id int(11) default NULL, + # name varchar default NULL, # PRIMARY KEY (id) # ) # - # CREATE TABLE authors ( + # CREATE TABLE accounts ( # id int(11) NOT NULL auto_increment, - # post_id int(11) default NULL, # name varchar default NULL, # PRIMARY KEY (id) # ) |