mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
@@ -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)
|
||||
|
||||
3
activerecord/test/fixtures/computers.yml
vendored
3
activerecord/test/fixtures/computers.yml
vendored
@@ -1,3 +1,4 @@
|
||||
workstation:
|
||||
id: 1
|
||||
developer: 1
|
||||
developer: 1
|
||||
extendedWarranty: 1
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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` (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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' (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user