aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-07-08 10:09:20 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2010-07-08 10:09:20 -0400
commitf6fa6cf6117e691899c821b8999bd7dfb3f48b38 (patch)
tree211a47939458fc21a16f9677b0c6153b08db0563 /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parentffdbe56d996a2992de44c6823263f8fea19c2d61 (diff)
downloadrails-f6fa6cf6117e691899c821b8999bd7dfb3f48b38.tar.gz
rails-f6fa6cf6117e691899c821b8999bd7dfb3f48b38.tar.bz2
rails-f6fa6cf6117e691899c821b8999bd7dfb3f48b38.zip
clarifying how to create non standard primary key
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 76b65bf219..555a611e68 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -106,7 +106,13 @@ module ActiveRecord
# Join tables for +has_and_belongs_to_many+ should set <tt>:id => false</tt>.
# [<tt>:primary_key</tt>]
# The name of the primary key, if one is to be added automatically.
- # Defaults to +id+.
+ # Defaults to +id+. You must NOT pass :id => false otherwise :primary_key option
+ # will have no effect.
+ #
+ # Also note that this just sets the primary_key in the table. You still need to
+ # add :set_primary_key => '' in the model to tell model what column is the
+ # primary_key. Models do NOT auto-detect the primary_key from table defintion.
+ #
# [<tt>:options</tt>]
# Any extra options you want appended to the table definition.
# [<tt>:temporary</tt>]