Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2005-04-30 15:49:28 +00:00
parent eefe4d0ddd
commit 2bf223051e
10 changed files with 19 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ class Smarts < ActiveRecord::Base; end
class CreditCard < ActiveRecord::Base; end
class MasterCreditCard < ActiveRecord::Base; end
class Post < ActiveRecord::Base; end
class Computer < ActiveRecord::Base; end
class LoosePerson < ActiveRecord::Base
attr_protected :credit_rating, :administrator
@@ -32,7 +33,7 @@ end
class Booleantest < ActiveRecord::Base; end
class BasicsTest < Test::Unit::TestCase
fixtures :topics, :companies, :projects
fixtures :topics, :companies, :projects, :computers
def test_set_attributes
topic = Topic.find(1)

View File

@@ -1,3 +1,4 @@
workstation:
id: 1
developer: 1
developer: 1
extendedWarranty: 1

View File

@@ -126,7 +126,8 @@ CREATE TABLE binaries (
CREATE TABLE computers (
id int generated by default as identity (start with +10000),
developer int NOT NULL
developer int NOT NULL,
extendedWarranty int NOT NULL
);
CREATE TABLE posts (

View File

@@ -126,7 +126,8 @@ CREATE TABLE `binaries` (
CREATE TABLE `computers` (
`id` INTEGER NOT NULL PRIMARY KEY,
`developer` INTEGER NOT NULL
`developer` INTEGER NOT NULL,
`extendedWarranty` INTEGER NOT NULL
) TYPE=InnoDB;
CREATE TABLE `posts` (

View File

@@ -164,7 +164,8 @@ create table binaries (
create table computers (
id integer not null primary key,
developer integer not null references developers initially deferred disable
developer integer not null references developers initially deferred disable,
extendedWarranty integer not null
);
create table posts (

View File

@@ -144,7 +144,8 @@ CREATE TABLE binaries (
CREATE TABLE computers (
id serial,
developer integer NOT NULL
developer integer NOT NULL,
extendedWarranty integer NOT NULL
);
CREATE TABLE posts (

View File

@@ -113,7 +113,8 @@ CREATE TABLE 'binaries' (
CREATE TABLE 'computers' (
'id' INTEGER NOT NULL PRIMARY KEY,
'developer' INTEGER NOT NULL
'developer' INTEGER NOT NULL,
'extendedWarranty' INTEGER NOT NULL
);
CREATE TABLE 'posts' (

View File

@@ -113,7 +113,8 @@ CREATE TABLE binaries (
CREATE TABLE computers (
id int NOT NULL IDENTITY(1, 1) PRIMARY KEY,
developer int NOT NULL
developer int NOT NULL,
extendedWarranty int NOT NULL
);
CREATE TABLE posts (