aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-10-16 03:45:39 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-10-16 03:45:39 +0000
commit7117fdb8ceeb4d8cc18651a74ea52f1bed2b077c (patch)
tree20dff4d44de2dcd1401e8cf008ceca0f077d50d8 /activerecord/lib/active_record/base.rb
parent22b77daeee65aa80061f247a3b36404bacd7dff5 (diff)
downloadrails-7117fdb8ceeb4d8cc18651a74ea52f1bed2b077c.tar.gz
rails-7117fdb8ceeb4d8cc18651a74ea52f1bed2b077c.tar.bz2
rails-7117fdb8ceeb4d8cc18651a74ea52f1bed2b077c.zip
r3616@asus: jeremy | 2005-09-26 23:09:28 -0700
Ticket 2292 - Sequences, schemas, and fixtures r3917@asus: jeremy | 2005-10-15 10:43:24 -0700 fix pk assert r3918@asus: jeremy | 2005-10-15 10:46:52 -0700 rework query cache connection= override r3919@asus: jeremy | 2005-10-15 10:47:45 -0700 correct fixtures usage r3920@asus: jeremy | 2005-10-15 10:53:23 -0700 correct attr assignment r3921@asus: jeremy | 2005-10-15 12:59:10 -0700 sequences r3922@asus: jeremy | 2005-10-15 16:36:09 -0700 reset fixtures work with sequences r3951@asus: jeremy | 2005-10-15 23:23:12 -0700 cut down excess features r3952@asus: jeremy | 2005-10-15 23:40:30 -0700 don't test for PostgreSQL specifically git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 48d9c6ae12..58f884595c 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -625,9 +625,9 @@ module ActiveRecord #:nodoc:
"type"
end
- # Defines the sequence_name (for Oracle) -- can be overridden in subclasses.
+ # Default sequence_name. Use set_sequence_name to override.
def sequence_name
- "#{table_name}_seq"
+ connection.default_sequence_name(table_name, primary_key)
end
# Sets the table name to use to the given value, or (if the value
@@ -675,8 +675,8 @@ module ActiveRecord #:nodoc:
# Sets the name of the sequence to use when generating ids to the given
# value, or (if the value is nil or false) to the value returned by the
- # given block. Currently useful only when using Oracle, which requires
- # explicit sequences.
+ # given block. This is required for Oracle and is useful for any
+ # database which relies on sequences for primary key generation.
#
# Setting the sequence name when using other dbs will have no effect.
# If a sequence name is not explicitly set when using Oracle, it will