large_text_field 0.3.2 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,165 +1,772 @@
1
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.0ms) select sqlite_version(*)
3
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to AddLargeTextFields (20110217210640)
6
+  (0.0ms) begin transaction
7
+  (0.3ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
8
+  (0.1ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
9
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110217210640"]]
10
+  (2.7ms) commit transaction
11
+ Migrating to CreateLibraries (20160217033529)
12
+  (0.0ms) begin transaction
13
+  (0.3ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) 
14
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160217033529"]]
15
+  (1.5ms) commit transaction
16
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
+  (0.1ms)  SELECT sql
18
+ FROM sqlite_master
19
+ WHERE name='large_text_field_by_owner_field' AND type='index'
20
+ UNION ALL
21
+ SELECT sql
22
+ FROM sqlite_temp_master
23
+ WHERE name='large_text_field_by_owner_field' AND type='index'
24
+ 
25
+  (1.4ms) DROP TABLE "large_text_fields"
26
+  (1.4ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
27
+  (0.0ms) select sqlite_version(*)
28
+  (1.2ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
29
+  (1.2ms) DROP TABLE "libraries"
30
+  (1.2ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
31
+  (0.1ms) SELECT version FROM "schema_migrations"
32
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1
33
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3
34
   (0.1ms) begin transaction
35
+ --------------------------------------------------------------------------------------------------
36
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
37
+ --------------------------------------------------------------------------------------------------
38
+  (0.0ms) rollback transaction
39
+  (0.0ms) begin transaction
40
+ -----------------------------------------------------------------------------------------------------------------------
41
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
42
+ -----------------------------------------------------------------------------------------------------------------------
43
+  (0.0ms) SAVEPOINT active_record_1
44
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
45
+  (0.0ms) RELEASE SAVEPOINT active_record_1
46
+  (0.1ms) SAVEPOINT active_record_1
47
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
48
+  (0.0ms) RELEASE SAVEPOINT active_record_1
49
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
50
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
51
+  (1.3ms) rollback transaction
52
+  (0.1ms) begin transaction
53
+ --------------------------------------------------------------------------------------------------------------------------
54
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
55
+ --------------------------------------------------------------------------------------------------------------------------
56
+  (0.0ms) rollback transaction
57
+  (0.0ms) begin transaction
58
+ -------------------------------------------------------------------------------------------------------
59
+ LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
60
+ -------------------------------------------------------------------------------------------------------
61
+  (0.0ms) SAVEPOINT active_record_1
62
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
63
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64
+  (0.0ms) SAVEPOINT active_record_1
65
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
66
+  (0.0ms) RELEASE SAVEPOINT active_record_1
67
+  (0.0ms) SAVEPOINT active_record_1
68
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
69
+  (0.0ms) RELEASE SAVEPOINT active_record_1
70
+  (0.0ms) SAVEPOINT active_record_1
71
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
72
+  (0.0ms) RELEASE SAVEPOINT active_record_1
73
+  (0.0ms) SAVEPOINT active_record_1
74
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
75
+  (0.0ms) RELEASE SAVEPOINT active_record_1
76
+  (0.8ms) rollback transaction
77
+  (0.0ms) begin transaction
78
+ ------------------------------------------------------------------------------------------------------------------------------------
79
+ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
80
+ ------------------------------------------------------------------------------------------------------------------------------------
81
+  (0.0ms) SAVEPOINT active_record_1
82
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
83
+  (0.0ms) RELEASE SAVEPOINT active_record_1
84
+  (0.0ms) SAVEPOINT active_record_1
85
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
86
+  (0.0ms) RELEASE SAVEPOINT active_record_1
87
+  (0.0ms) SAVEPOINT active_record_1
88
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
89
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
90
+  (0.8ms) rollback transaction
91
+  (0.0ms) begin transaction
92
+ ---------------------------------------------------------------------------------------------------
93
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
94
+ ---------------------------------------------------------------------------------------------------
95
+  (0.0ms) SAVEPOINT active_record_1
96
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
97
+  (0.0ms) RELEASE SAVEPOINT active_record_1
98
+  (0.0ms) SAVEPOINT active_record_1
99
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
101
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
102
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
103
+  (1.1ms) rollback transaction
104
+  (0.0ms) begin transaction
105
+ --------------------------------------------------------------------------------------------------------------------------------
106
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
107
+ --------------------------------------------------------------------------------------------------------------------------------
108
+  (0.0ms) rollback transaction
109
+  (0.0ms) begin transaction
4
110
  ----------------------------------------------------------------------------------------------------------
5
111
  LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
6
112
  ----------------------------------------------------------------------------------------------------------
7
113
   (0.0ms) SAVEPOINT active_record_1
8
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
114
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
115
+  (0.0ms) RELEASE SAVEPOINT active_record_1
116
+  (1.1ms) rollback transaction
117
+  (0.1ms) begin transaction
118
+ ---------------------------------------------------------------------------------------------------
119
+ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
120
+ ---------------------------------------------------------------------------------------------------
121
+  (0.0ms) SAVEPOINT active_record_1
122
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
123
+  (0.0ms) RELEASE SAVEPOINT active_record_1
124
+  (0.0ms) SAVEPOINT active_record_1
125
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
126
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
128
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
129
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
130
+  (0.0ms) SAVEPOINT active_record_1
131
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
132
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
133
+  (0.0ms) RELEASE SAVEPOINT active_record_1
134
+  (1.1ms) rollback transaction
135
+  (0.0ms) begin transaction
136
+ ------------------------------------------------------------------------------------------------------
137
+ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
138
+ ------------------------------------------------------------------------------------------------------
139
+  (0.0ms) SAVEPOINT active_record_1
140
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
141
+  (0.0ms) RELEASE SAVEPOINT active_record_1
142
+  (0.0ms) SAVEPOINT active_record_1
143
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
144
+  (0.0ms) RELEASE SAVEPOINT active_record_1
145
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
146
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
147
+  (0.0ms) SAVEPOINT active_record_1
148
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
149
+  (0.0ms) RELEASE SAVEPOINT active_record_1
150
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
151
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
152
+  (0.0ms) SAVEPOINT active_record_1
153
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
154
+  (0.0ms) RELEASE SAVEPOINT active_record_1
155
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
156
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
157
+  (1.2ms) rollback transaction
158
+  (0.1ms) begin transaction
159
+ ----------------------------------------------------------------------------------------
160
+ LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
161
+ ----------------------------------------------------------------------------------------
162
+  (0.0ms) SAVEPOINT active_record_1
163
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
164
+  (0.0ms) RELEASE SAVEPOINT active_record_1
165
+  (0.0ms) SAVEPOINT active_record_1
166
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
167
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
168
+  (0.0ms) RELEASE SAVEPOINT active_record_1
169
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
170
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
171
+  (1.0ms) rollback transaction
172
+  (0.0ms) begin transaction
173
+ ----------------------------------------------------------------------------------------------
174
+ LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
175
+ ----------------------------------------------------------------------------------------------
176
+  (0.0ms) SAVEPOINT active_record_1
177
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
179
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
180
+  (0.0ms) SAVEPOINT active_record_1
181
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
182
+  (0.0ms) RELEASE SAVEPOINT active_record_1
183
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
184
+  (0.0ms) SAVEPOINT active_record_1
185
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
186
+  (0.0ms) RELEASE SAVEPOINT active_record_1
187
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
188
+  (0.0ms) SAVEPOINT active_record_1
189
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
190
+  (0.0ms) RELEASE SAVEPOINT active_record_1
191
+  (0.8ms) rollback transaction
192
+  (0.1ms) begin transaction
193
+ ---------------------------------------------------------------------------------------------------
194
+ LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
195
+ ---------------------------------------------------------------------------------------------------
196
+  (0.1ms) SAVEPOINT active_record_1
197
+ SQL (7.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
198
+  (0.1ms) RELEASE SAVEPOINT active_record_1
199
+  (0.1ms) SAVEPOINT active_record_1
200
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
201
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
202
+  (0.1ms) RELEASE SAVEPOINT active_record_1
203
+  (0.1ms) SAVEPOINT active_record_1
204
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
205
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
206
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
207
+  (0.1ms) RELEASE SAVEPOINT active_record_1
208
+  (0.0ms) SAVEPOINT active_record_1
209
+  (0.0ms) RELEASE SAVEPOINT active_record_1
210
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
211
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
212
+  (0.1ms) SAVEPOINT active_record_1
213
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
214
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
215
+ SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
216
+  (0.0ms) RELEASE SAVEPOINT active_record_1
217
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
218
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
219
+  (33.4ms) rollback transaction
220
+  (0.1ms) begin transaction
221
+ -------------------------------------------------------------------------------------------------------------------------------------------------------------
222
+ LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
223
+ -------------------------------------------------------------------------------------------------------------------------------------------------------------
224
+  (0.0ms) SAVEPOINT active_record_1
225
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
226
+  (0.1ms) RELEASE SAVEPOINT active_record_1
227
+  (8.8ms) rollback transaction
228
+  (0.1ms) begin transaction
229
+ ------------------------------------------------------------------------------------------------------
230
+ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
231
+ ------------------------------------------------------------------------------------------------------
232
+  (0.0ms) SAVEPOINT active_record_1
233
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
234
+  (0.1ms) RELEASE SAVEPOINT active_record_1
235
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
236
+  (0.0ms) SAVEPOINT active_record_1
237
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
238
+  (0.1ms) RELEASE SAVEPOINT active_record_1
239
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
240
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
241
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
242
+  (0.0ms) SAVEPOINT active_record_1
243
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
244
+  (0.0ms) RELEASE SAVEPOINT active_record_1
245
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
246
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
247
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
248
+  (1.2ms) rollback transaction
249
+  (0.1ms) begin transaction
250
+ ------------------------------------------------------------------------------------------------------------------
251
+ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
252
+ ------------------------------------------------------------------------------------------------------------------
253
+  (0.0ms) SAVEPOINT active_record_1
254
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
255
+  (0.0ms) RELEASE SAVEPOINT active_record_1
256
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
257
+  (0.0ms) SAVEPOINT active_record_1
258
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
259
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
261
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
262
+  (0.0ms) SAVEPOINT active_record_1
263
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
264
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
265
+  (0.0ms) RELEASE SAVEPOINT active_record_1
266
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
267
+  (0.8ms) rollback transaction
268
+  (0.0ms) begin transaction
269
+ --------------------------------------------------------------------------------------------------------------------
270
+ LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
271
+ --------------------------------------------------------------------------------------------------------------------
272
+  (0.0ms) SAVEPOINT active_record_1
273
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
274
+  (0.1ms) RELEASE SAVEPOINT active_record_1
275
+  (0.1ms) SAVEPOINT active_record_1
276
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
277
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
279
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
280
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
281
+  (0.9ms) rollback transaction
282
+  (0.1ms) begin transaction
283
+ --------------------------------------------------------------------------------------------------------
284
+ LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
285
+ --------------------------------------------------------------------------------------------------------
286
+  (0.0ms) SAVEPOINT active_record_1
287
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
288
+  (0.0ms) RELEASE SAVEPOINT active_record_1
289
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
290
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
291
+  (0.0ms) SAVEPOINT active_record_1
292
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
293
+  (0.1ms) RELEASE SAVEPOINT active_record_1
294
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
295
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
296
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
297
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
298
+  (3.2ms) rollback transaction
299
+  (0.1ms) begin transaction
300
+ ---------------------------------------------------------------------------------------------------
301
+ LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
302
+ ---------------------------------------------------------------------------------------------------
303
+  (0.0ms) SAVEPOINT active_record_1
304
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
305
+  (0.2ms) RELEASE SAVEPOINT active_record_1
306
+  (0.1ms) SAVEPOINT active_record_1
307
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
308
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
309
+  (0.1ms) RELEASE SAVEPOINT active_record_1
310
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
311
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
312
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
313
+  (1.1ms) rollback transaction
314
+  (0.1ms) begin transaction
315
+ -------------------------------------------------------------------------------------------------------
316
+ LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
317
+ -------------------------------------------------------------------------------------------------------
318
+  (0.0ms) SAVEPOINT active_record_1
319
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
320
+  (0.0ms) RELEASE SAVEPOINT active_record_1
321
+  (1.2ms) rollback transaction
322
+  (0.1ms) begin transaction
323
+ -----------------------------------------------------------------------------------------------------------------------------------------------
324
+ LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
325
+ -----------------------------------------------------------------------------------------------------------------------------------------------
326
+  (0.0ms) SAVEPOINT active_record_1
327
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
328
+  (0.0ms) RELEASE SAVEPOINT active_record_1
329
+  (1.4ms) rollback transaction
330
+  (0.1ms) begin transaction
331
+ -----------------------------------------------------------------------------------------------------------------------
332
+ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
333
+ -----------------------------------------------------------------------------------------------------------------------
334
+  (0.0ms) SAVEPOINT active_record_1
335
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
336
+  (0.0ms) RELEASE SAVEPOINT active_record_1
337
+  (1.2ms) rollback transaction
338
+  (0.1ms) begin transaction
339
+ ------------------------------------------------------------------------------
340
+ LargeTextField::OwnerTest: test_: a large text field should read from a file.
341
+ ------------------------------------------------------------------------------
342
+  (0.0ms) SAVEPOINT active_record_1
343
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
344
+  (0.0ms) RELEASE SAVEPOINT active_record_1
345
+  (0.0ms) SAVEPOINT active_record_1
346
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
347
+  (0.0ms) RELEASE SAVEPOINT active_record_1
348
+  (0.1ms) SAVEPOINT active_record_1
349
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
350
+  (0.1ms) RELEASE SAVEPOINT active_record_1
351
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
352
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
353
+  (1.2ms) rollback transaction
354
+  (0.1ms) begin transaction
355
+ ------------------------------------------------------------------------------------------------------------------
356
+ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
357
+ ------------------------------------------------------------------------------------------------------------------
358
+  (0.1ms) SAVEPOINT active_record_1
359
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
360
+  (0.0ms) RELEASE SAVEPOINT active_record_1
361
+  (0.0ms) SAVEPOINT active_record_1
362
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
363
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
364
+  (0.0ms) RELEASE SAVEPOINT active_record_1
365
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
366
+  (0.0ms) SAVEPOINT active_record_1
367
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
368
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
369
+  (0.0ms) RELEASE SAVEPOINT active_record_1
370
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
371
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
372
+  (1.2ms) rollback transaction
373
+  (0.1ms) begin transaction
374
+ -------------------------------------------------------------------------------------------------
375
+ LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
376
+ -------------------------------------------------------------------------------------------------
377
+  (0.0ms) SAVEPOINT active_record_1
378
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
379
+  (0.1ms) RELEASE SAVEPOINT active_record_1
380
+  (1.2ms) rollback transaction
381
+  (0.1ms) begin transaction
382
+ ------------------------------------------------------------------------------------------------------------
383
+ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
384
+ ------------------------------------------------------------------------------------------------------------
385
+  (0.0ms) SAVEPOINT active_record_1
386
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
387
+  (0.0ms) RELEASE SAVEPOINT active_record_1
388
+  (1.2ms) rollback transaction
389
+  (0.1ms) begin transaction
390
+ -----------------------------------------------------------------------------------------
391
+ LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
392
+ -----------------------------------------------------------------------------------------
393
+  (0.0ms) SAVEPOINT active_record_1
394
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
395
+  (0.0ms) RELEASE SAVEPOINT active_record_1
396
+  (1.3ms) rollback transaction
397
+  (0.1ms) begin transaction
398
+ ----------------------------------------------------------------------------------------------------------------
399
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
400
+ ----------------------------------------------------------------------------------------------------------------
401
+  (0.0ms) SAVEPOINT active_record_1
402
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
403
+  (0.0ms) RELEASE SAVEPOINT active_record_1
404
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
405
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
406
+  (1.0ms) rollback transaction
407
+  (0.0ms) begin transaction
408
+ --------------------------------------------------------------------------------------------------------------------
409
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
410
+ --------------------------------------------------------------------------------------------------------------------
411
+  (0.0ms) SAVEPOINT active_record_1
412
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
413
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
414
+  (0.1ms) RELEASE SAVEPOINT active_record_1
415
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
416
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
417
+  (0.8ms) rollback transaction
418
+  (0.1ms) begin transaction
419
+ -----------------------------------------------------------------------------------------------------------------
420
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
421
+ -----------------------------------------------------------------------------------------------------------------
422
+  (0.0ms) SAVEPOINT active_record_1
423
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
424
+  (0.0ms) rollback transaction
425
+  (0.0ms) begin transaction
426
+ ------------------------------
427
+ LargeTextFieldTest: test_truth
428
+ ------------------------------
429
+  (0.0ms) rollback transaction
430
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
431
+  (0.1ms) begin transaction
432
+ ------------------------------
433
+ LargeTextFieldTest: test_truth
434
+ ------------------------------
9
435
   (0.0ms) rollback transaction
10
436
   (0.0ms) begin transaction
437
+ ----------------------------------------------------------------------------------------------------------
438
+ LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
439
+ ----------------------------------------------------------------------------------------------------------
440
+  (0.0ms) SAVEPOINT active_record_1
441
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
443
+  (0.8ms) rollback transaction
444
+  (0.0ms) begin transaction
11
445
  ---------------------------------------------------------------------------------------------------
12
446
  LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
13
447
  ---------------------------------------------------------------------------------------------------
448
+  (0.0ms) SAVEPOINT active_record_1
449
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
450
+  (0.0ms) RELEASE SAVEPOINT active_record_1
14
451
   (0.0ms) SAVEPOINT active_record_1
15
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
16
-  (0.0ms) rollback transaction
452
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
453
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
454
+  (0.0ms) RELEASE SAVEPOINT active_record_1
455
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
456
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
457
+  (0.0ms) SAVEPOINT active_record_1
458
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
459
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
460
+  (0.0ms) RELEASE SAVEPOINT active_record_1
461
+  (0.8ms) rollback transaction
17
462
   (0.0ms) begin transaction
18
463
  ------------------------------------------------------------------------------------------------------
19
464
  LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
20
465
  ------------------------------------------------------------------------------------------------------
21
466
   (0.0ms) SAVEPOINT active_record_1
22
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
23
-  (0.0ms) rollback transaction
467
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
468
+  (0.0ms) RELEASE SAVEPOINT active_record_1
469
+  (0.0ms) SAVEPOINT active_record_1
470
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
472
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
473
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
474
+  (0.0ms) SAVEPOINT active_record_1
475
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
476
+  (0.0ms) RELEASE SAVEPOINT active_record_1
477
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
478
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
479
+  (0.0ms) SAVEPOINT active_record_1
480
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
481
+  (0.0ms) RELEASE SAVEPOINT active_record_1
482
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
483
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
484
+  (0.7ms) rollback transaction
24
485
   (0.0ms) begin transaction
25
486
  ----------------------------------------------------------------------------------------
26
487
  LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
27
488
  ----------------------------------------------------------------------------------------
28
489
   (0.0ms) SAVEPOINT active_record_1
29
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
30
-  (0.0ms) rollback transaction
31
-  (0.0ms) begin transaction
490
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
491
+  (0.0ms) RELEASE SAVEPOINT active_record_1
492
+  (0.0ms) SAVEPOINT active_record_1
493
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
494
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
495
+  (0.0ms) RELEASE SAVEPOINT active_record_1
496
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
497
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
498
+  (0.7ms) rollback transaction
499
+  (0.0ms) begin transaction
32
500
  ----------------------------------------------------------------------------------------------
33
501
  LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
34
502
  ----------------------------------------------------------------------------------------------
35
-  (0.0ms) SAVEPOINT active_record_1
36
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
37
-  (0.0ms) rollback transaction
503
+  (0.0ms) SAVEPOINT active_record_1
504
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
505
+  (0.0ms) RELEASE SAVEPOINT active_record_1
506
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
507
+  (0.0ms) SAVEPOINT active_record_1
508
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
509
+  (0.1ms) RELEASE SAVEPOINT active_record_1
510
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
511
+  (0.0ms) SAVEPOINT active_record_1
512
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
513
+  (0.0ms) RELEASE SAVEPOINT active_record_1
514
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
515
+  (0.0ms) SAVEPOINT active_record_1
516
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
517
+  (0.0ms) RELEASE SAVEPOINT active_record_1
518
+  (0.7ms) rollback transaction
38
519
   (0.0ms) begin transaction
39
520
  ---------------------------------------------------------------------------------------------------
40
521
  LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
41
522
  ---------------------------------------------------------------------------------------------------
42
523
   (0.0ms) SAVEPOINT active_record_1
43
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
44
-  (0.0ms) rollback transaction
45
-  (0.0ms) begin transaction
524
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
525
+  (0.0ms) RELEASE SAVEPOINT active_record_1
526
+  (0.0ms) SAVEPOINT active_record_1
527
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
528
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
529
+  (0.0ms) RELEASE SAVEPOINT active_record_1
530
+  (0.0ms) SAVEPOINT active_record_1
531
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
532
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
533
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
534
+  (0.0ms) RELEASE SAVEPOINT active_record_1
535
+  (0.0ms) SAVEPOINT active_record_1
536
+  (0.0ms) RELEASE SAVEPOINT active_record_1
537
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
538
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
539
+  (0.0ms) SAVEPOINT active_record_1
540
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
541
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
542
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
543
+  (0.0ms) RELEASE SAVEPOINT active_record_1
544
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
545
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
546
+  (0.7ms) rollback transaction
547
+  (0.0ms) begin transaction
46
548
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
47
549
  LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
48
550
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
49
-  (0.0ms) SAVEPOINT active_record_1
50
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
51
-  (0.0ms) rollback transaction
551
+  (0.0ms) SAVEPOINT active_record_1
552
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
553
+  (0.0ms) RELEASE SAVEPOINT active_record_1
554
+  (0.8ms) rollback transaction
52
555
   (0.0ms) begin transaction
53
556
  ------------------------------------------------------------------------------------------------------
54
557
  LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
55
558
  ------------------------------------------------------------------------------------------------------
56
559
   (0.0ms) SAVEPOINT active_record_1
57
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
58
-  (0.0ms) rollback transaction
560
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
561
+  (0.0ms) RELEASE SAVEPOINT active_record_1
562
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
563
+  (0.0ms) SAVEPOINT active_record_1
564
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
565
+  (0.0ms) RELEASE SAVEPOINT active_record_1
566
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
567
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
568
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
569
+  (0.0ms) SAVEPOINT active_record_1
570
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
571
+  (0.0ms) RELEASE SAVEPOINT active_record_1
572
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
573
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
574
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
575
+  (0.7ms) rollback transaction
59
576
   (0.0ms) begin transaction
60
577
  ------------------------------------------------------------------------------------------------------------------
61
578
  LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
62
579
  ------------------------------------------------------------------------------------------------------------------
63
580
   (0.0ms) SAVEPOINT active_record_1
64
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
65
-  (0.0ms) rollback transaction
581
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
583
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
584
+  (0.0ms) SAVEPOINT active_record_1
585
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
586
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
587
+  (0.0ms) RELEASE SAVEPOINT active_record_1
588
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
589
+  (0.0ms) SAVEPOINT active_record_1
590
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
591
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
592
+  (0.0ms) RELEASE SAVEPOINT active_record_1
593
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
594
+  (0.6ms) rollback transaction
66
595
   (0.0ms) begin transaction
67
596
  --------------------------------------------------------------------------------------------------------------------
68
597
  LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
69
598
  --------------------------------------------------------------------------------------------------------------------
70
599
   (0.0ms) SAVEPOINT active_record_1
71
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
72
-  (0.0ms) rollback transaction
73
-  (0.0ms) begin transaction
600
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
601
+  (0.0ms) RELEASE SAVEPOINT active_record_1
602
+  (0.0ms) SAVEPOINT active_record_1
603
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
604
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
606
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
607
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
608
+  (0.7ms) rollback transaction
609
+  (0.0ms) begin transaction
74
610
  --------------------------------------------------------------------------------------------------------
75
611
  LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
76
612
  --------------------------------------------------------------------------------------------------------
613
+  (0.0ms) SAVEPOINT active_record_1
614
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
615
+  (0.0ms) RELEASE SAVEPOINT active_record_1
616
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
617
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
77
618
   (0.0ms) SAVEPOINT active_record_1
78
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
79
-  (0.0ms) rollback transaction
80
-  (0.0ms) begin transaction
619
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
620
+  (0.0ms) RELEASE SAVEPOINT active_record_1
621
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
622
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
623
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
624
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
625
+  (0.7ms) rollback transaction
626
+  (0.0ms) begin transaction
81
627
  ---------------------------------------------------------------------------------------------------
82
628
  LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
83
629
  ---------------------------------------------------------------------------------------------------
84
-  (0.1ms) SAVEPOINT active_record_1
85
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
86
-  (0.0ms) rollback transaction
87
-  (0.0ms) begin transaction
630
+  (0.0ms) SAVEPOINT active_record_1
631
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
632
+  (0.0ms) RELEASE SAVEPOINT active_record_1
633
+  (0.0ms) SAVEPOINT active_record_1
634
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
635
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
636
+  (0.0ms) RELEASE SAVEPOINT active_record_1
637
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
638
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
639
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
640
+  (0.7ms) rollback transaction
641
+  (0.0ms) begin transaction
88
642
  -------------------------------------------------------------------------------------------------------
89
643
  LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
90
644
  -------------------------------------------------------------------------------------------------------
91
-  (0.0ms) SAVEPOINT active_record_1
92
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
93
-  (0.0ms) rollback transaction
645
+  (0.0ms) SAVEPOINT active_record_1
646
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
647
+  (0.0ms) RELEASE SAVEPOINT active_record_1
648
+  (0.8ms) rollback transaction
94
649
   (0.0ms) begin transaction
95
650
  -----------------------------------------------------------------------------------------------------------------------------------------------
96
651
  LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
97
652
  -----------------------------------------------------------------------------------------------------------------------------------------------
98
653
   (0.0ms) SAVEPOINT active_record_1
99
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
100
-  (0.0ms) rollback transaction
101
-  (0.0ms) begin transaction
654
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
655
+  (0.0ms) RELEASE SAVEPOINT active_record_1
656
+  (0.7ms) rollback transaction
657
+  (0.0ms) begin transaction
102
658
  -----------------------------------------------------------------------------------------------------------------------
103
659
  LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
104
660
  -----------------------------------------------------------------------------------------------------------------------
105
-  (0.0ms) SAVEPOINT active_record_1
106
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
107
-  (0.0ms) rollback transaction
661
+  (0.0ms) SAVEPOINT active_record_1
662
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
663
+  (0.0ms) RELEASE SAVEPOINT active_record_1
664
+  (0.7ms) rollback transaction
108
665
   (0.0ms) begin transaction
109
666
  ------------------------------------------------------------------------------
110
667
  LargeTextField::OwnerTest: test_: a large text field should read from a file.
111
668
  ------------------------------------------------------------------------------
112
669
   (0.0ms) SAVEPOINT active_record_1
113
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
114
-  (0.0ms) rollback transaction
115
-  (0.0ms) begin transaction
670
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
671
+  (0.0ms) RELEASE SAVEPOINT active_record_1
672
+  (0.0ms) SAVEPOINT active_record_1
673
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
675
+  (0.0ms) SAVEPOINT active_record_1
676
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
677
+  (0.0ms) RELEASE SAVEPOINT active_record_1
678
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
679
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
680
+  (0.6ms) rollback transaction
681
+  (0.0ms) begin transaction
116
682
  ------------------------------------------------------------------------------------------------------------------
117
683
  LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
118
684
  ------------------------------------------------------------------------------------------------------------------
685
+  (0.0ms) SAVEPOINT active_record_1
686
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
687
+  (0.0ms) RELEASE SAVEPOINT active_record_1
119
688
   (0.0ms) SAVEPOINT active_record_1
120
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
121
-  (0.0ms) rollback transaction
122
-  (0.0ms) begin transaction
689
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
690
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
691
+  (0.0ms) RELEASE SAVEPOINT active_record_1
692
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
693
+  (0.0ms) SAVEPOINT active_record_1
694
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
695
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
696
+  (0.0ms) RELEASE SAVEPOINT active_record_1
697
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
698
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
699
+  (0.7ms) rollback transaction
700
+  (0.0ms) begin transaction
123
701
  -------------------------------------------------------------------------------------------------
124
702
  LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
125
703
  -------------------------------------------------------------------------------------------------
126
-  (0.0ms) SAVEPOINT active_record_1
127
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
128
-  (0.0ms) rollback transaction
704
+  (0.0ms) SAVEPOINT active_record_1
705
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
706
+  (0.0ms) RELEASE SAVEPOINT active_record_1
707
+  (0.8ms) rollback transaction
129
708
   (0.0ms) begin transaction
130
709
  ------------------------------------------------------------------------------------------------------------
131
710
  LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
132
711
  ------------------------------------------------------------------------------------------------------------
133
712
   (0.0ms) SAVEPOINT active_record_1
134
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
135
-  (0.0ms) rollback transaction
136
-  (0.0ms) begin transaction
713
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
714
+  (0.0ms) RELEASE SAVEPOINT active_record_1
715
+  (2.2ms) rollback transaction
716
+  (0.0ms) begin transaction
137
717
  -----------------------------------------------------------------------------------------
138
718
  LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
139
719
  -----------------------------------------------------------------------------------------
140
-  (0.1ms) SAVEPOINT active_record_1
141
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
142
-  (0.0ms) rollback transaction
143
-  (0.0ms) begin transaction
720
+  (0.0ms) SAVEPOINT active_record_1
721
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
722
+  (0.0ms) RELEASE SAVEPOINT active_record_1
723
+  (0.9ms) rollback transaction
724
+  (0.1ms) begin transaction
144
725
  ----------------------------------------------------------------------------------------------------------------
145
726
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
146
727
  ----------------------------------------------------------------------------------------------------------------
147
728
   (0.0ms) SAVEPOINT active_record_1
148
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
149
-  (0.0ms) rollback transaction
150
-  (0.0ms) begin transaction
729
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
730
+  (0.0ms) RELEASE SAVEPOINT active_record_1
731
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
732
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
733
+  (0.8ms) rollback transaction
734
+  (0.0ms) begin transaction
151
735
  --------------------------------------------------------------------------------------------------------------------
152
736
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
153
737
  --------------------------------------------------------------------------------------------------------------------
154
-  (0.0ms) SAVEPOINT active_record_1
155
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
156
-  (0.0ms) rollback transaction
157
-  (0.0ms) begin transaction
738
+  (0.0ms) SAVEPOINT active_record_1
739
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
740
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
741
+  (0.0ms) RELEASE SAVEPOINT active_record_1
742
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
743
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
744
+  (0.7ms) rollback transaction
745
+  (0.0ms) begin transaction
158
746
  -----------------------------------------------------------------------------------------------------------------
159
747
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
160
748
  -----------------------------------------------------------------------------------------------------------------
161
-  (0.0ms) SAVEPOINT active_record_1
162
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
749
+  (0.0ms) SAVEPOINT active_record_1
750
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
751
+  (0.0ms) rollback transaction
752
+  (0.0ms) begin transaction
753
+ ---------------------------------------------------------------------------------------------------
754
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
755
+ ---------------------------------------------------------------------------------------------------
756
+  (0.0ms) SAVEPOINT active_record_1
757
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
758
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
759
+  (0.0ms) RELEASE SAVEPOINT active_record_1
760
+  (0.0ms) SAVEPOINT active_record_1
761
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
762
+  (0.0ms) RELEASE SAVEPOINT active_record_1
763
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
764
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
765
+  (1.2ms) rollback transaction
766
+  (0.1ms) begin transaction
767
+ --------------------------------------------------------------------------------------------------------------------------------
768
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
769
+ --------------------------------------------------------------------------------------------------------------------------------
163
770
   (0.0ms) rollback transaction
164
771
   (0.0ms) begin transaction
165
772
  --------------------------------------------------------------------------------------------------
@@ -171,51 +778,59 @@ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should
171
778
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
172
779
  -----------------------------------------------------------------------------------------------------------------------
173
780
   (0.0ms) SAVEPOINT active_record_1
174
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
175
-  (0.0ms) rollback transaction
176
-  (0.0ms) begin transaction
781
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
782
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
783
+  (0.0ms) RELEASE SAVEPOINT active_record_1
784
+  (0.0ms) SAVEPOINT active_record_1
785
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
786
+  (0.0ms) RELEASE SAVEPOINT active_record_1
787
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]]
788
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
789
+  (0.7ms) rollback transaction
790
+  (0.0ms) begin transaction
177
791
  --------------------------------------------------------------------------------------------------------------------------
178
792
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
179
793
  --------------------------------------------------------------------------------------------------------------------------
180
-  (0.0ms) rollback transaction
181
-  (0.0ms) begin transaction
794
+  (0.0ms) rollback transaction
795
+  (0.0ms) begin transaction
182
796
  -------------------------------------------------------------------------------------------------------
183
797
  LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
184
798
  -------------------------------------------------------------------------------------------------------
799
+  (0.0ms) SAVEPOINT active_record_1
800
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
801
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
802
+  (0.0ms) RELEASE SAVEPOINT active_record_1
803
+  (0.0ms) SAVEPOINT active_record_1
804
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
805
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 2]]
806
+  (0.0ms) RELEASE SAVEPOINT active_record_1
807
+  (0.0ms) SAVEPOINT active_record_1
808
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
809
+  (0.0ms) RELEASE SAVEPOINT active_record_1
185
810
   (0.0ms) SAVEPOINT active_record_1
186
-  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
187
-  (0.0ms) rollback transaction
811
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
813
+  (0.0ms) SAVEPOINT active_record_1
814
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
815
+  (0.0ms) RELEASE SAVEPOINT active_record_1
816
+  (0.7ms) rollback transaction
188
817
   (0.0ms) begin transaction
189
818
  ------------------------------------------------------------------------------------------------------------------------------------
190
819
  LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
191
820
  ------------------------------------------------------------------------------------------------------------------------------------
192
821
   (0.0ms) SAVEPOINT active_record_1
193
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
194
-  (0.0ms) rollback transaction
195
-  (0.0ms) begin transaction
196
- ---------------------------------------------------------------------------------------------------
197
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
198
- ---------------------------------------------------------------------------------------------------
822
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
823
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
824
+  (0.0ms) RELEASE SAVEPOINT active_record_1
199
825
   (0.0ms) SAVEPOINT active_record_1
826
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
828
+  (0.0ms) SAVEPOINT active_record_1
829
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
200
830
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
201
-  (0.0ms) rollback transaction
202
-  (0.0ms) begin transaction
203
- --------------------------------------------------------------------------------------------------------------------------------
204
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
205
- --------------------------------------------------------------------------------------------------------------------------------
206
-  (0.0ms) rollback transaction
207
-  (0.0ms) begin transaction
208
- ------------------------------
209
- LargeTextFieldTest: test_truth
210
- ------------------------------
211
-  (0.0ms) rollback transaction
212
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
831
+  (0.7ms) rollback transaction
832
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
213
833
   (0.1ms) begin transaction
214
- ------------------------------
215
- LargeTextFieldTest: test_truth
216
- ------------------------------
217
-  (0.0ms) rollback transaction
218
-  (0.0ms) begin transaction
219
834
  --------------------------------------------------------------------------------------------------
220
835
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
221
836
  --------------------------------------------------------------------------------------------------
@@ -225,14 +840,14 @@ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should
225
840
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
226
841
  -----------------------------------------------------------------------------------------------------------------------
227
842
   (0.0ms) SAVEPOINT active_record_1
228
- SQL (0.8ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
843
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
229
844
   (0.0ms) RELEASE SAVEPOINT active_record_1
230
845
   (0.0ms) SAVEPOINT active_record_1
231
- SQL (0.5ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
846
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
232
847
   (0.0ms) RELEASE SAVEPOINT active_record_1
233
848
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
234
849
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
235
-  (0.7ms) rollback transaction
850
+  (1.0ms) rollback transaction
236
851
   (0.0ms) begin transaction
237
852
  --------------------------------------------------------------------------------------------------------------------------
238
853
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
@@ -253,11 +868,11 @@ LargeTextField::NamedTextValueTest: test_: unique index should allow different o
253
868
   (0.0ms) RELEASE SAVEPOINT active_record_1
254
869
   (0.0ms) SAVEPOINT active_record_1
255
870
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
256
-  (0.1ms) RELEASE SAVEPOINT active_record_1
871
+  (0.0ms) RELEASE SAVEPOINT active_record_1
257
872
   (0.0ms) SAVEPOINT active_record_1
258
873
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
259
874
   (0.0ms) RELEASE SAVEPOINT active_record_1
260
-  (0.8ms) rollback transaction
875
+  (0.7ms) rollback transaction
261
876
   (0.0ms) begin transaction
262
877
  ------------------------------------------------------------------------------------------------------------------------------------
263
878
  LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
@@ -271,7 +886,7 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
271
886
   (0.0ms) SAVEPOINT active_record_1
272
887
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
273
888
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
274
-  (0.9ms) rollback transaction
889
+  (0.7ms) rollback transaction
275
890
   (0.0ms) begin transaction
276
891
  ---------------------------------------------------------------------------------------------------
277
892
  LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
@@ -280,51 +895,97 @@ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to co
280
895
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
281
896
   (0.0ms) RELEASE SAVEPOINT active_record_1
282
897
   (0.0ms) SAVEPOINT active_record_1
283
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
284
-  (1.6ms) rollback transaction
285
-  (0.0ms) begin transaction
898
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
899
+  (0.0ms) RELEASE SAVEPOINT active_record_1
900
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
901
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
902
+  (0.7ms) rollback transaction
903
+  (0.0ms) begin transaction
286
904
  --------------------------------------------------------------------------------------------------------------------------------
287
905
  LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
288
906
  --------------------------------------------------------------------------------------------------------------------------------
289
-  (0.0ms) rollback transaction
290
-  (0.0ms) begin transaction
907
+  (0.0ms) rollback transaction
908
+  (0.0ms) begin transaction
291
909
  ----------------------------------------------------------------------------------------------------------
292
910
  LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
293
911
  ----------------------------------------------------------------------------------------------------------
294
-  (0.0ms) SAVEPOINT active_record_1
295
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
296
-  (0.0ms) RELEASE SAVEPOINT active_record_1
297
-  (0.8ms) rollback transaction
298
-  (0.0ms) begin transaction
299
- ---------------------------------------------------------------------------------------------------
300
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
301
- ---------------------------------------------------------------------------------------------------
302
912
   (0.0ms) SAVEPOINT active_record_1
303
913
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
304
914
   (0.0ms) RELEASE SAVEPOINT active_record_1
305
915
   (0.8ms) rollback transaction
306
916
   (0.0ms) begin transaction
917
+ ---------------------------------------------------------------------------------------------------
918
+ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
919
+ ---------------------------------------------------------------------------------------------------
920
+  (0.0ms) SAVEPOINT active_record_1
921
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
922
+  (0.0ms) RELEASE SAVEPOINT active_record_1
923
+  (0.0ms) SAVEPOINT active_record_1
924
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
925
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
926
+  (0.0ms) RELEASE SAVEPOINT active_record_1
927
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
928
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
929
+  (0.0ms) SAVEPOINT active_record_1
930
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
931
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
932
+  (0.0ms) RELEASE SAVEPOINT active_record_1
933
+  (0.8ms) rollback transaction
934
+  (0.0ms) begin transaction
307
935
  ------------------------------------------------------------------------------------------------------
308
936
  LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
309
937
  ------------------------------------------------------------------------------------------------------
938
+  (0.0ms) SAVEPOINT active_record_1
939
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
940
+  (0.0ms) RELEASE SAVEPOINT active_record_1
310
941
   (0.0ms) SAVEPOINT active_record_1
311
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
942
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
312
943
   (0.0ms) RELEASE SAVEPOINT active_record_1
944
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
945
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
946
+  (0.0ms) SAVEPOINT active_record_1
947
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
948
+  (0.0ms) RELEASE SAVEPOINT active_record_1
949
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
950
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
951
+  (0.0ms) SAVEPOINT active_record_1
952
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
953
+  (0.1ms) RELEASE SAVEPOINT active_record_1
954
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
955
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
313
956
   (0.8ms) rollback transaction
314
-  (0.1ms) begin transaction
957
+  (0.0ms) begin transaction
315
958
  ----------------------------------------------------------------------------------------
316
959
  LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
317
960
  ----------------------------------------------------------------------------------------
318
961
   (0.0ms) SAVEPOINT active_record_1
319
962
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
320
963
   (0.0ms) RELEASE SAVEPOINT active_record_1
321
-  (1.0ms) rollback transaction
964
+  (0.0ms) SAVEPOINT active_record_1
965
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
966
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
967
+  (0.0ms) RELEASE SAVEPOINT active_record_1
968
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
969
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
970
+  (0.7ms) rollback transaction
322
971
   (0.0ms) begin transaction
323
972
  ----------------------------------------------------------------------------------------------
324
973
  LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
325
974
  ----------------------------------------------------------------------------------------------
326
975
   (0.0ms) SAVEPOINT active_record_1
327
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
976
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
977
+  (0.0ms) RELEASE SAVEPOINT active_record_1
978
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
979
+  (0.0ms) SAVEPOINT active_record_1
980
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
981
+  (0.0ms) RELEASE SAVEPOINT active_record_1
982
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
983
+  (0.0ms) SAVEPOINT active_record_1
984
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
985
+  (0.0ms) RELEASE SAVEPOINT active_record_1
986
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
987
+  (0.0ms) SAVEPOINT active_record_1
988
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
328
989
   (0.0ms) RELEASE SAVEPOINT active_record_1
329
990
   (0.7ms) rollback transaction
330
991
   (0.0ms) begin transaction
@@ -334,31 +995,75 @@ LargeTextField::OwnerTest: test_: a large text field should be cloned with the r
334
995
   (0.0ms) SAVEPOINT active_record_1
335
996
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
336
997
   (0.0ms) RELEASE SAVEPOINT active_record_1
337
-  (0.7ms) rollback transaction
998
+  (0.0ms) SAVEPOINT active_record_1
999
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1000
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1001
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1002
+  (0.0ms) SAVEPOINT active_record_1
1003
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1004
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1005
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
1006
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1007
+  (0.0ms) SAVEPOINT active_record_1
1008
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1009
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1010
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1011
+  (0.0ms) SAVEPOINT active_record_1
1012
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
1013
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
1014
+ SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1015
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1016
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
1017
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
1018
+  (0.8ms) rollback transaction
338
1019
   (0.0ms) begin transaction
339
1020
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
340
1021
  LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
341
1022
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
342
1023
   (0.0ms) SAVEPOINT active_record_1
343
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1024
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
344
1025
   (0.0ms) RELEASE SAVEPOINT active_record_1
345
-  (0.9ms) rollback transaction
1026
+  (0.7ms) rollback transaction
346
1027
   (0.0ms) begin transaction
347
1028
  ------------------------------------------------------------------------------------------------------
348
1029
  LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
349
1030
  ------------------------------------------------------------------------------------------------------
350
1031
   (0.0ms) SAVEPOINT active_record_1
351
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1032
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
352
1033
   (0.0ms) RELEASE SAVEPOINT active_record_1
353
-  (0.7ms) rollback transaction
354
-  (0.0ms) begin transaction
1034
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1035
+  (0.0ms) SAVEPOINT active_record_1
1036
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1037
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1038
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1039
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1040
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1041
+  (0.0ms) SAVEPOINT active_record_1
1042
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1043
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1044
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1045
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1046
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1047
+  (0.8ms) rollback transaction
1048
+  (0.1ms) begin transaction
355
1049
  ------------------------------------------------------------------------------------------------------------------
356
1050
  LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
357
1051
  ------------------------------------------------------------------------------------------------------------------
358
-  (0.0ms) SAVEPOINT active_record_1
359
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1052
+  (0.0ms) SAVEPOINT active_record_1
1053
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1054
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1055
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1056
+  (0.0ms) SAVEPOINT active_record_1
1057
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1058
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
360
1059
   (0.0ms) RELEASE SAVEPOINT active_record_1
361
-  (1.1ms) rollback transaction
1060
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1061
+  (0.0ms) SAVEPOINT active_record_1
1062
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1063
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1064
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1065
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1066
+  (0.9ms) rollback transaction
362
1067
   (0.0ms) begin transaction
363
1068
  --------------------------------------------------------------------------------------------------------------------
364
1069
  LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
@@ -366,7 +1071,13 @@ LargeTextField::OwnerTest: test_: a large text field should detect changes when
366
1071
   (0.0ms) SAVEPOINT active_record_1
367
1072
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
368
1073
   (0.0ms) RELEASE SAVEPOINT active_record_1
369
-  (0.9ms) rollback transaction
1074
+  (0.0ms) SAVEPOINT active_record_1
1075
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1076
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
1077
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1078
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1079
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1080
+  (0.7ms) rollback transaction
370
1081
   (0.0ms) begin transaction
371
1082
  --------------------------------------------------------------------------------------------------------
372
1083
  LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
@@ -374,23 +1085,39 @@ LargeTextField::OwnerTest: test_: a large text field should forget about changes
374
1085
   (0.0ms) SAVEPOINT active_record_1
375
1086
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
376
1087
   (0.0ms) RELEASE SAVEPOINT active_record_1
377
-  (0.7ms) rollback transaction
378
-  (0.0ms) begin transaction
1088
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1089
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1090
+  (0.0ms) SAVEPOINT active_record_1
1091
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1092
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1093
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1094
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1095
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1096
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1097
+  (0.8ms) rollback transaction
1098
+  (0.0ms) begin transaction
379
1099
  ---------------------------------------------------------------------------------------------------
380
1100
  LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
381
1101
  ---------------------------------------------------------------------------------------------------
1102
+  (0.0ms) SAVEPOINT active_record_1
1103
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1104
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382
1105
   (0.0ms) SAVEPOINT active_record_1
383
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
384
-  (0.0ms) RELEASE SAVEPOINT active_record_1
385
-  (0.8ms) rollback transaction
1106
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
1107
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1108
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1109
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1110
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1111
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1112
+  (0.7ms) rollback transaction
386
1113
   (0.0ms) begin transaction
387
1114
  -------------------------------------------------------------------------------------------------------
388
1115
  LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
389
1116
  -------------------------------------------------------------------------------------------------------
390
-  (0.1ms) SAVEPOINT active_record_1
1117
+  (0.0ms) SAVEPOINT active_record_1
391
1118
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
392
1119
   (0.0ms) RELEASE SAVEPOINT active_record_1
393
-  (1.0ms) rollback transaction
1120
+  (0.8ms) rollback transaction
394
1121
   (0.0ms) begin transaction
395
1122
  -----------------------------------------------------------------------------------------------------------------------------------------------
396
1123
  LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
@@ -412,9 +1139,17 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Intege
412
1139
  LargeTextField::OwnerTest: test_: a large text field should read from a file.
413
1140
  ------------------------------------------------------------------------------
414
1141
   (0.0ms) SAVEPOINT active_record_1
415
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1142
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
416
1143
   (0.0ms) RELEASE SAVEPOINT active_record_1
417
-  (0.9ms) rollback transaction
1144
+  (0.0ms) SAVEPOINT active_record_1
1145
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1146
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1147
+  (0.1ms) SAVEPOINT active_record_1
1148
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
1149
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1150
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1151
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1152
+  (0.7ms) rollback transaction
418
1153
   (0.0ms) begin transaction
419
1154
  ------------------------------------------------------------------------------------------------------------------
420
1155
  LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
@@ -422,74 +1157,94 @@ LargeTextField::OwnerTest: test_: a large text field should reload changes when
422
1157
   (0.0ms) SAVEPOINT active_record_1
423
1158
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
424
1159
   (0.0ms) RELEASE SAVEPOINT active_record_1
425
-  (0.7ms) rollback transaction
426
-  (0.0ms) begin transaction
427
- -------------------------------------------------------------------------------------------------
428
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
429
- -------------------------------------------------------------------------------------------------
430
1160
   (0.0ms) SAVEPOINT active_record_1
431
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1161
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1162
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1163
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1164
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1165
+  (0.0ms) SAVEPOINT active_record_1
1166
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1167
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
432
1168
   (0.0ms) RELEASE SAVEPOINT active_record_1
1169
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1170
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
433
1171
   (0.7ms) rollback transaction
434
1172
   (0.0ms) begin transaction
1173
+ -------------------------------------------------------------------------------------------------
1174
+ LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
1175
+ -------------------------------------------------------------------------------------------------
1176
+  (0.0ms) SAVEPOINT active_record_1
1177
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1179
+  (1.0ms) rollback transaction
1180
+  (0.1ms) begin transaction
435
1181
  ------------------------------------------------------------------------------------------------------------
436
1182
  LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
437
1183
  ------------------------------------------------------------------------------------------------------------
438
-  (0.0ms) SAVEPOINT active_record_1
439
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
440
-  (0.0ms) RELEASE SAVEPOINT active_record_1
441
-  (0.9ms) rollback transaction
442
-  (0.0ms) begin transaction
443
- -----------------------------------------------------------------------------------------
444
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
445
- -----------------------------------------------------------------------------------------
446
1184
   (0.0ms) SAVEPOINT active_record_1
447
1185
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
448
1186
   (0.0ms) RELEASE SAVEPOINT active_record_1
449
-  (0.7ms) rollback transaction
1187
+  (0.8ms) rollback transaction
450
1188
   (0.0ms) begin transaction
451
- ----------------------------------------------------------------------------------------------------------------
452
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
453
- ----------------------------------------------------------------------------------------------------------------
1189
+ -----------------------------------------------------------------------------------------
1190
+ LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
1191
+ -----------------------------------------------------------------------------------------
454
1192
   (0.0ms) SAVEPOINT active_record_1
455
1193
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
456
1194
   (0.0ms) RELEASE SAVEPOINT active_record_1
457
-  (0.7ms) rollback transaction
458
-  (0.0ms) begin transaction
1195
+  (1.8ms) rollback transaction
1196
+  (0.1ms) begin transaction
1197
+ ----------------------------------------------------------------------------------------------------------------
1198
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
1199
+ ----------------------------------------------------------------------------------------------------------------
1200
+  (0.0ms) SAVEPOINT active_record_1
1201
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1202
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1203
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1204
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1205
+  (2.9ms) rollback transaction
1206
+  (0.1ms) begin transaction
459
1207
  --------------------------------------------------------------------------------------------------------------------
460
1208
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
461
1209
  --------------------------------------------------------------------------------------------------------------------
462
-  (0.0ms) SAVEPOINT active_record_1
463
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
464
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
465
-  (0.0ms) RELEASE SAVEPOINT active_record_1
466
-  (0.6ms) rollback transaction
467
-  (0.0ms) begin transaction
1210
+  (0.0ms) SAVEPOINT active_record_1
1211
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1212
+ SQL (0.8ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
1213
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1214
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1215
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1216
+  (2.8ms) rollback transaction
1217
+  (0.4ms) begin transaction
468
1218
  -----------------------------------------------------------------------------------------------------------------
469
1219
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
470
1220
  -----------------------------------------------------------------------------------------------------------------
471
-  (0.0ms) SAVEPOINT active_record_1
472
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
473
-  (0.0ms) rollback transaction
474
- ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
1221
+  (0.0ms) SAVEPOINT active_record_1
1222
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1223
+  (0.0ms) rollback transaction
1224
+  (0.0ms) begin transaction
1225
+ ------------------------------
1226
+ LargeTextFieldTest: test_truth
1227
+ ------------------------------
1228
+  (0.0ms) rollback transaction
1229
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
475
1230
   (0.1ms) begin transaction
476
1231
  --------------------------------------------------------------------------------------------------
477
1232
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
478
1233
  --------------------------------------------------------------------------------------------------
479
-  (0.1ms) rollback transaction
1234
+  (0.0ms) rollback transaction
480
1235
   (0.0ms) begin transaction
481
1236
  -----------------------------------------------------------------------------------------------------------------------
482
1237
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
483
1238
  -----------------------------------------------------------------------------------------------------------------------
484
1239
   (0.0ms) SAVEPOINT active_record_1
485
- SQL (0.9ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
486
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1240
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1241
+  (0.0ms) RELEASE SAVEPOINT active_record_1
487
1242
   (0.0ms) SAVEPOINT active_record_1
488
- SQL (0.6ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
1243
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
489
1244
   (0.0ms) RELEASE SAVEPOINT active_record_1
490
1245
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
491
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
492
-  (4.7ms) rollback transaction
1246
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1247
+  (1.0ms) rollback transaction
493
1248
   (0.0ms) begin transaction
494
1249
  --------------------------------------------------------------------------------------------------------------------------
495
1250
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
@@ -501,10 +1256,10 @@ LargeTextField::NamedTextValueTest: test_: unique index should allow different o
501
1256
  -------------------------------------------------------------------------------------------------------
502
1257
   (0.0ms) SAVEPOINT active_record_1
503
1258
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
504
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1259
+  (0.0ms) RELEASE SAVEPOINT active_record_1
505
1260
   (0.0ms) SAVEPOINT active_record_1
506
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
507
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1261
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
1262
+  (0.0ms) RELEASE SAVEPOINT active_record_1
508
1263
   (0.0ms) SAVEPOINT active_record_1
509
1264
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
510
1265
   (0.0ms) RELEASE SAVEPOINT active_record_1
@@ -514,7 +1269,7 @@ LargeTextField::NamedTextValueTest: test_: unique index should allow different o
514
1269
   (0.0ms) SAVEPOINT active_record_1
515
1270
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
516
1271
   (0.0ms) RELEASE SAVEPOINT active_record_1
517
-  (0.9ms) rollback transaction
1272
+  (0.7ms) rollback transaction
518
1273
   (0.0ms) begin transaction
519
1274
  ------------------------------------------------------------------------------------------------------------------------------------
520
1275
  LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
@@ -526,35 +1281,22 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
526
1281
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
527
1282
   (0.0ms) RELEASE SAVEPOINT active_record_1
528
1283
   (0.0ms) SAVEPOINT active_record_1
529
- SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
1284
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
530
1285
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
531
-  (0.9ms) rollback transaction
532
-  (0.0ms) begin transaction
533
- ---------------------------------------------------------------------------------------------------
534
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
535
- ---------------------------------------------------------------------------------------------------
536
-  (0.0ms) SAVEPOINT active_record_1
537
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
538
-  (0.0ms) RELEASE SAVEPOINT active_record_1
539
-  (0.0ms) SAVEPOINT active_record_1
540
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
541
-  (0.0ms) RELEASE SAVEPOINT active_record_1
542
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
543
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
544
-  (0.8ms) rollback transaction
1286
+  (0.6ms) rollback transaction
545
1287
   (0.0ms) begin transaction
546
- --------------------------------------------------------------------------------------------------------------------------------
547
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
548
- --------------------------------------------------------------------------------------------------------------------------------
1288
+ ------------------------------
1289
+ LargeTextFieldTest: test_truth
1290
+ ------------------------------
549
1291
   (0.0ms) rollback transaction
550
1292
   (0.0ms) begin transaction
551
1293
  ----------------------------------------------------------------------------------------------------------
552
1294
  LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
553
1295
  ----------------------------------------------------------------------------------------------------------
554
1296
   (0.0ms) SAVEPOINT active_record_1
555
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1297
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
556
1298
   (0.0ms) RELEASE SAVEPOINT active_record_1
557
-  (3.9ms) rollback transaction
1299
+  (0.7ms) rollback transaction
558
1300
   (0.0ms) begin transaction
559
1301
  ---------------------------------------------------------------------------------------------------
560
1302
  LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
@@ -567,12 +1309,12 @@ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent
567
1309
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
568
1310
   (0.0ms) RELEASE SAVEPOINT active_record_1
569
1311
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
570
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1312
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
571
1313
   (0.0ms) SAVEPOINT active_record_1
572
1314
  SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
573
1315
  SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
574
1316
   (0.0ms) RELEASE SAVEPOINT active_record_1
575
-  (0.9ms) rollback transaction
1317
+  (0.7ms) rollback transaction
576
1318
   (0.0ms) begin transaction
577
1319
  ------------------------------------------------------------------------------------------------------
578
1320
  LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
@@ -595,13 +1337,13 @@ LargeTextField::OwnerTest: test_: a large text field should allow get and set wi
595
1337
   (0.0ms) RELEASE SAVEPOINT active_record_1
596
1338
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
597
1339
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
598
-  (0.8ms) rollback transaction
599
-  (0.1ms) begin transaction
1340
+  (0.6ms) rollback transaction
1341
+  (0.0ms) begin transaction
600
1342
  ----------------------------------------------------------------------------------------
601
1343
  LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
602
1344
  ----------------------------------------------------------------------------------------
603
1345
   (0.0ms) SAVEPOINT active_record_1
604
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1346
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
605
1347
   (0.0ms) RELEASE SAVEPOINT active_record_1
606
1348
   (0.0ms) SAVEPOINT active_record_1
607
1349
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
@@ -609,7 +1351,7 @@ LargeTextField::OwnerTest: test_: a large text field should be able to be eager
609
1351
   (0.0ms) RELEASE SAVEPOINT active_record_1
610
1352
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
611
1353
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
612
-  (1.0ms) rollback transaction
1354
+  (0.7ms) rollback transaction
613
1355
   (0.0ms) begin transaction
614
1356
  ----------------------------------------------------------------------------------------------
615
1357
  LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
@@ -617,7 +1359,7 @@ LargeTextField::OwnerTest: test_: a large text field should be able to update de
617
1359
   (0.0ms) SAVEPOINT active_record_1
618
1360
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
619
1361
   (0.0ms) RELEASE SAVEPOINT active_record_1
620
-  (0.2ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1362
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
621
1363
   (0.0ms) SAVEPOINT active_record_1
622
1364
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
623
1365
   (0.0ms) RELEASE SAVEPOINT active_record_1
@@ -629,7 +1371,7 @@ LargeTextField::OwnerTest: test_: a large text field should be able to update de
629
1371
   (0.0ms) SAVEPOINT active_record_1
630
1372
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
631
1373
   (0.0ms) RELEASE SAVEPOINT active_record_1
632
-  (1.0ms) rollback transaction
1374
+  (0.7ms) rollback transaction
633
1375
   (0.0ms) begin transaction
634
1376
  ---------------------------------------------------------------------------------------------------
635
1377
  LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
@@ -642,12 +1384,12 @@ LargeTextField::OwnerTest: test_: a large text field should be cloned with the r
642
1384
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
643
1385
   (0.0ms) RELEASE SAVEPOINT active_record_1
644
1386
   (0.0ms) SAVEPOINT active_record_1
645
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1387
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
646
1388
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
647
1389
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
648
1390
   (0.0ms) RELEASE SAVEPOINT active_record_1
649
1391
   (0.0ms) SAVEPOINT active_record_1
650
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1392
+  (0.0ms) RELEASE SAVEPOINT active_record_1
651
1393
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
652
1394
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
653
1395
   (0.0ms) SAVEPOINT active_record_1
@@ -663,9 +1405,9 @@ LargeTextField::OwnerTest: test_: a large text field should be cloned with the r
663
1405
  LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
664
1406
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
665
1407
   (0.0ms) SAVEPOINT active_record_1
666
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1408
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
667
1409
   (0.0ms) RELEASE SAVEPOINT active_record_1
668
-  (1.0ms) rollback transaction
1410
+  (0.8ms) rollback transaction
669
1411
   (0.0ms) begin transaction
670
1412
  ------------------------------------------------------------------------------------------------------
671
1413
  LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
@@ -686,15 +1428,15 @@ LargeTextField::OwnerTest: test_: a large text field should delete fields when t
686
1428
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
687
1429
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
688
1430
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
689
-  (0.7ms) rollback transaction
1431
+  (0.6ms) rollback transaction
690
1432
   (0.0ms) begin transaction
691
1433
  ------------------------------------------------------------------------------------------------------------------
692
1434
  LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
693
1435
  ------------------------------------------------------------------------------------------------------------------
694
1436
   (0.0ms) SAVEPOINT active_record_1
695
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1437
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
696
1438
   (0.0ms) RELEASE SAVEPOINT active_record_1
697
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1439
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
698
1440
   (0.0ms) SAVEPOINT active_record_1
699
1441
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
700
1442
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
@@ -711,7 +1453,7 @@ LargeTextField::OwnerTest: test_: a large text field should delete large text fi
711
1453
  LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
712
1454
  --------------------------------------------------------------------------------------------------------------------
713
1455
   (0.0ms) SAVEPOINT active_record_1
714
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1456
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
715
1457
   (0.0ms) RELEASE SAVEPOINT active_record_1
716
1458
   (0.0ms) SAVEPOINT active_record_1
717
1459
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
@@ -719,7 +1461,7 @@ LargeTextField::OwnerTest: test_: a large text field should detect changes when
719
1461
   (0.0ms) RELEASE SAVEPOINT active_record_1
720
1462
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
721
1463
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
722
-  (0.9ms) rollback transaction
1464
+  (0.6ms) rollback transaction
723
1465
   (0.0ms) begin transaction
724
1466
  --------------------------------------------------------------------------------------------------------
725
1467
  LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
@@ -736,22 +1478,22 @@ LargeTextField::OwnerTest: test_: a large text field should forget about changes
736
1478
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
737
1479
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
738
1480
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
739
-  (0.8ms) rollback transaction
1481
+  (0.6ms) rollback transaction
740
1482
   (0.0ms) begin transaction
741
1483
  ---------------------------------------------------------------------------------------------------
742
1484
  LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
743
1485
  ---------------------------------------------------------------------------------------------------
744
1486
   (0.0ms) SAVEPOINT active_record_1
745
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1487
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
746
1488
   (0.0ms) RELEASE SAVEPOINT active_record_1
747
1489
   (0.0ms) SAVEPOINT active_record_1
748
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
749
- SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1490
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
1491
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
750
1492
   (0.0ms) RELEASE SAVEPOINT active_record_1
751
1493
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
752
1494
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
753
1495
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
754
-  (1.0ms) rollback transaction
1496
+  (0.7ms) rollback transaction
755
1497
   (0.0ms) begin transaction
756
1498
  -------------------------------------------------------------------------------------------------------
757
1499
  LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
@@ -759,7 +1501,7 @@ LargeTextField::OwnerTest: test_: a large text field should only validate_large_
759
1501
   (0.0ms) SAVEPOINT active_record_1
760
1502
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
761
1503
   (0.0ms) RELEASE SAVEPOINT active_record_1
762
-  (10.4ms) rollback transaction
1504
+  (0.7ms) rollback transaction
763
1505
   (0.0ms) begin transaction
764
1506
  -----------------------------------------------------------------------------------------------------------------------------------------------
765
1507
  LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
@@ -767,13 +1509,13 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a custom max
767
1509
   (0.0ms) SAVEPOINT active_record_1
768
1510
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
769
1511
   (0.0ms) RELEASE SAVEPOINT active_record_1
770
-  (1.1ms) rollback transaction
1512
+  (0.7ms) rollback transaction
771
1513
   (0.0ms) begin transaction
772
1514
  -----------------------------------------------------------------------------------------------------------------------
773
1515
  LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
774
1516
  -----------------------------------------------------------------------------------------------------------------------
775
1517
   (0.0ms) SAVEPOINT active_record_1
776
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1518
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
777
1519
   (0.0ms) RELEASE SAVEPOINT active_record_1
778
1520
   (0.7ms) rollback transaction
779
1521
   (0.0ms) begin transaction
@@ -781,7 +1523,7 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Intege
781
1523
  LargeTextField::OwnerTest: test_: a large text field should read from a file.
782
1524
  ------------------------------------------------------------------------------
783
1525
   (0.0ms) SAVEPOINT active_record_1
784
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1526
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
785
1527
   (0.0ms) RELEASE SAVEPOINT active_record_1
786
1528
   (0.0ms) SAVEPOINT active_record_1
787
1529
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
@@ -797,10 +1539,10 @@ LargeTextField::OwnerTest: test_: a large text field should read from a file.
797
1539
  LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
798
1540
  ------------------------------------------------------------------------------------------------------------------
799
1541
   (0.0ms) SAVEPOINT active_record_1
800
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1542
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
801
1543
   (0.0ms) RELEASE SAVEPOINT active_record_1
802
1544
   (0.0ms) SAVEPOINT active_record_1
803
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1545
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
804
1546
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
805
1547
   (0.0ms) RELEASE SAVEPOINT active_record_1
806
1548
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
@@ -810,7 +1552,7 @@ LargeTextField::OwnerTest: test_: a large text field should reload changes when
810
1552
   (0.0ms) RELEASE SAVEPOINT active_record_1
811
1553
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
812
1554
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
813
-  (1.0ms) rollback transaction
1555
+  (0.7ms) rollback transaction
814
1556
   (0.0ms) begin transaction
815
1557
  -------------------------------------------------------------------------------------------------
816
1558
  LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
@@ -818,7 +1560,7 @@ LargeTextField::OwnerTest: test_: a large text field should singularize the erro
818
1560
   (0.0ms) SAVEPOINT active_record_1
819
1561
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
820
1562
   (0.0ms) RELEASE SAVEPOINT active_record_1
821
-  (0.9ms) rollback transaction
1563
+  (0.8ms) rollback transaction
822
1564
   (0.0ms) begin transaction
823
1565
  ------------------------------------------------------------------------------------------------------------
824
1566
  LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
@@ -826,7 +1568,7 @@ LargeTextField::OwnerTest: test_: a large text field should support strings or s
826
1568
   (0.0ms) SAVEPOINT active_record_1
827
1569
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
828
1570
   (0.0ms) RELEASE SAVEPOINT active_record_1
829
-  (1.0ms) rollback transaction
1571
+  (0.7ms) rollback transaction
830
1572
   (0.0ms) begin transaction
831
1573
  -----------------------------------------------------------------------------------------
832
1574
  LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
@@ -834,7 +1576,7 @@ LargeTextField::OwnerTest: test_: a large text field should validate the maximum
834
1576
   (0.0ms) SAVEPOINT active_record_1
835
1577
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
836
1578
   (0.0ms) RELEASE SAVEPOINT active_record_1
837
-  (1.1ms) rollback transaction
1579
+  (0.8ms) rollback transaction
838
1580
   (0.0ms) begin transaction
839
1581
  ----------------------------------------------------------------------------------------------------------------
840
1582
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
@@ -855,7 +1597,7 @@ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should
855
1597
   (0.0ms) RELEASE SAVEPOINT active_record_1
856
1598
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
857
1599
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
858
-  (0.8ms) rollback transaction
1600
+  (0.7ms) rollback transaction
859
1601
   (0.0ms) begin transaction
860
1602
  -----------------------------------------------------------------------------------------------------------------
861
1603
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
@@ -864,22 +1606,84 @@ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should
864
1606
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
865
1607
   (0.0ms) rollback transaction
866
1608
   (0.0ms) begin transaction
867
- ------------------------------
868
- LargeTextFieldTest: test_truth
869
- ------------------------------
870
-  (0.0ms) rollback transaction
871
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
872
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
873
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
874
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1609
+ ---------------------------------------------------------------------------------------------------
1610
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
1611
+ ---------------------------------------------------------------------------------------------------
1612
+  (0.0ms) SAVEPOINT active_record_1
1613
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
1614
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
1615
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1616
+  (0.0ms) SAVEPOINT active_record_1
1617
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
1618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1619
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1620
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1621
+  (0.6ms) rollback transaction
875
1622
   (0.0ms) begin transaction
1623
+ --------------------------------------------------------------------------------------------------------------------------------
1624
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
1625
+ --------------------------------------------------------------------------------------------------------------------------------
1626
+  (0.0ms) rollback transaction
1627
+  (63.6ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
1628
+  (28.3ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)
1629
+  (14.4ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
1630
+  (14.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
1631
+  (25.4ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) 
1632
+  (1.0ms) SELECT version FROM `schema_migrations`
1633
+  (0.5ms) INSERT INTO `schema_migrations` (version) VALUES ('20160217033529')
1634
+  (1.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20110217210640')
1635
+ ActiveRecord::SchemaMigration Load (3.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1636
+  (13.5ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
1637
+  (29.8ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
1638
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1639
+ Migrating to AddLargeTextFields (20110217210640)
1640
+  (25.8ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
1641
+  (15.0ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) 
1642
+  (0.1ms) BEGIN
1643
+ SQL (3.1ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20110217210640')
1644
+  (0.4ms) COMMIT
1645
+ Migrating to CreateLibraries (20160217033529)
1646
+  (15.7ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
1647
+  (0.1ms) BEGIN
1648
+ SQL (0.8ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160217033529')
1649
+  (0.3ms) COMMIT
1650
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1651
+  (0.3ms) SELECT fk.referenced_table_name as 'to_table'
1652
+ ,fk.referenced_column_name as 'primary_key'
1653
+ ,fk.column_name as 'column'
1654
+ ,fk.constraint_name as 'name'
1655
+ FROM information_schema.key_column_usage fk
1656
+ WHERE fk.referenced_column_name is not null
1657
+ AND fk.table_schema = 'large_text_field_test'
1658
+ AND fk.table_name = 'large_text_fields'
1659
+
1660
+  (0.1ms) SHOW CREATE TABLE `large_text_fields`
1661
+  (0.2ms) SELECT fk.referenced_table_name as 'to_table'
1662
+ ,fk.referenced_column_name as 'primary_key'
1663
+ ,fk.column_name as 'column'
1664
+ ,fk.constraint_name as 'name'
1665
+ FROM information_schema.key_column_usage fk
1666
+ WHERE fk.referenced_column_name is not null
1667
+ AND fk.table_schema = 'large_text_field_test'
1668
+ AND fk.table_name = 'libraries'
1669
+
1670
+  (0.1ms) SHOW CREATE TABLE `libraries`
1671
+  (6.3ms) DROP TABLE `large_text_fields` CASCADE
1672
+  (32.5ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
1673
+  (20.9ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) 
1674
+  (4.1ms) DROP TABLE `libraries` CASCADE
1675
+  (12.3ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
1676
+  (3.0ms) SELECT version FROM `schema_migrations`
1677
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1678
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1679
+  (0.1ms) begin transaction
876
1680
  ----------------------------------------------------------------------------------------------------------
877
1681
  LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
878
1682
  ----------------------------------------------------------------------------------------------------------
879
1683
   (0.0ms) SAVEPOINT active_record_1
880
1684
  SQL (1.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
881
1685
   (0.0ms) RELEASE SAVEPOINT active_record_1
882
-  (0.7ms) rollback transaction
1686
+  (0.9ms) rollback transaction
883
1687
   (0.0ms) begin transaction
884
1688
  ---------------------------------------------------------------------------------------------------
885
1689
  LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
@@ -888,22 +1692,22 @@ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent
888
1692
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
889
1693
   (0.0ms) RELEASE SAVEPOINT active_record_1
890
1694
   (0.0ms) SAVEPOINT active_record_1
891
- SQL (0.5ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
892
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1695
+ SQL (0.7ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1696
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
893
1697
   (0.0ms) RELEASE SAVEPOINT active_record_1
894
1698
  Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
895
1699
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
896
1700
   (0.0ms) SAVEPOINT active_record_1
897
1701
  SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
898
- SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
1702
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
899
1703
   (0.0ms) RELEASE SAVEPOINT active_record_1
900
-  (0.7ms) rollback transaction
901
-  (0.1ms) begin transaction
1704
+  (0.9ms) rollback transaction
1705
+  (0.0ms) begin transaction
902
1706
  ------------------------------------------------------------------------------------------------------
903
1707
  LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
904
1708
  ------------------------------------------------------------------------------------------------------
905
1709
   (0.0ms) SAVEPOINT active_record_1
906
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1710
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
907
1711
   (0.0ms) RELEASE SAVEPOINT active_record_1
908
1712
   (0.0ms) SAVEPOINT active_record_1
909
1713
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
@@ -920,7 +1724,7 @@ LargeTextField::OwnerTest: test_: a large text field should allow get and set wi
920
1724
   (0.0ms) RELEASE SAVEPOINT active_record_1
921
1725
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
922
1726
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
923
-  (1.0ms) rollback transaction
1727
+  (0.8ms) rollback transaction
924
1728
   (0.0ms) begin transaction
925
1729
  ----------------------------------------------------------------------------------------
926
1730
  LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
@@ -931,10 +1735,10 @@ LargeTextField::OwnerTest: test_: a large text field should be able to be eager
931
1735
   (0.0ms) SAVEPOINT active_record_1
932
1736
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
933
1737
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
934
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1738
+  (0.1ms) RELEASE SAVEPOINT active_record_1
935
1739
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
936
- LargeTextField::NamedTextValue Load (0.2ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
937
-  (0.7ms) rollback transaction
1740
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
1741
+  (0.9ms) rollback transaction
938
1742
   (0.0ms) begin transaction
939
1743
  ----------------------------------------------------------------------------------------------
940
1744
  LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
@@ -954,7 +1758,7 @@ LargeTextField::OwnerTest: test_: a large text field should be able to update de
954
1758
   (0.0ms) SAVEPOINT active_record_1
955
1759
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
956
1760
   (0.0ms) RELEASE SAVEPOINT active_record_1
957
-  (0.7ms) rollback transaction
1761
+  (0.9ms) rollback transaction
958
1762
   (0.0ms) begin transaction
959
1763
  ---------------------------------------------------------------------------------------------------
960
1764
  LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
@@ -990,18 +1794,18 @@ LargeTextField::OwnerTest: test_: a large text field should declare the associat
990
1794
   (0.0ms) SAVEPOINT active_record_1
991
1795
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
992
1796
   (0.0ms) RELEASE SAVEPOINT active_record_1
993
-  (0.7ms) rollback transaction
1797
+  (0.9ms) rollback transaction
994
1798
   (0.0ms) begin transaction
995
1799
  ------------------------------------------------------------------------------------------------------
996
1800
  LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
997
1801
  ------------------------------------------------------------------------------------------------------
998
1802
   (0.0ms) SAVEPOINT active_record_1
999
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1803
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1000
1804
   (0.0ms) RELEASE SAVEPOINT active_record_1
1001
1805
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1002
1806
   (0.0ms) SAVEPOINT active_record_1
1003
1807
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1004
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1808
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1005
1809
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1006
1810
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1007
1811
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
@@ -1011,32 +1815,32 @@ LargeTextField::OwnerTest: test_: a large text field should delete fields when t
1011
1815
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1012
1816
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1013
1817
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1014
-  (0.8ms) rollback transaction
1818
+  (0.9ms) rollback transaction
1015
1819
   (0.0ms) begin transaction
1016
1820
  ------------------------------------------------------------------------------------------------------------------
1017
1821
  LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
1018
1822
  ------------------------------------------------------------------------------------------------------------------
1019
1823
   (0.0ms) SAVEPOINT active_record_1
1020
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1824
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1021
1825
   (0.0ms) RELEASE SAVEPOINT active_record_1
1022
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1826
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1023
1827
   (0.0ms) SAVEPOINT active_record_1
1024
1828
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1025
1829
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1026
1830
   (0.0ms) RELEASE SAVEPOINT active_record_1
1027
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1831
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1028
1832
   (0.0ms) SAVEPOINT active_record_1
1029
1833
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1030
1834
  SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1031
1835
   (0.0ms) RELEASE SAVEPOINT active_record_1
1032
1836
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1033
-  (0.9ms) rollback transaction
1837
+  (2.0ms) rollback transaction
1034
1838
   (0.0ms) begin transaction
1035
1839
  --------------------------------------------------------------------------------------------------------------------
1036
1840
  LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
1037
1841
  --------------------------------------------------------------------------------------------------------------------
1038
1842
   (0.0ms) SAVEPOINT active_record_1
1039
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1843
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1040
1844
   (0.0ms) RELEASE SAVEPOINT active_record_1
1041
1845
   (0.0ms) SAVEPOINT active_record_1
1042
1846
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
@@ -1044,7 +1848,7 @@ LargeTextField::OwnerTest: test_: a large text field should detect changes when
1044
1848
   (0.0ms) RELEASE SAVEPOINT active_record_1
1045
1849
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1046
1850
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1047
-  (0.7ms) rollback transaction
1851
+  (0.8ms) rollback transaction
1048
1852
   (0.0ms) begin transaction
1049
1853
  --------------------------------------------------------------------------------------------------------
1050
1854
  LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
@@ -1061,7 +1865,7 @@ LargeTextField::OwnerTest: test_: a large text field should forget about changes
1061
1865
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1062
1866
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1063
1867
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1064
-  (0.9ms) rollback transaction
1868
+  (0.8ms) rollback transaction
1065
1869
   (0.0ms) begin transaction
1066
1870
  ---------------------------------------------------------------------------------------------------
1067
1871
  LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
@@ -1076,7 +1880,7 @@ LargeTextField::OwnerTest: test_: a large text field should not save fields that
1076
1880
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1077
1881
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1078
1882
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1079
-  (0.7ms) rollback transaction
1883
+  (0.8ms) rollback transaction
1080
1884
   (0.0ms) begin transaction
1081
1885
  -------------------------------------------------------------------------------------------------------
1082
1886
  LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
@@ -1084,7 +1888,7 @@ LargeTextField::OwnerTest: test_: a large text field should only validate_large_
1084
1888
   (0.0ms) SAVEPOINT active_record_1
1085
1889
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1086
1890
   (0.0ms) RELEASE SAVEPOINT active_record_1
1087
-  (5.6ms) rollback transaction
1891
+  (0.8ms) rollback transaction
1088
1892
   (0.0ms) begin transaction
1089
1893
  -----------------------------------------------------------------------------------------------------------------------------------------------
1090
1894
  LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
@@ -1092,21 +1896,21 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a custom max
1092
1896
   (0.0ms) SAVEPOINT active_record_1
1093
1897
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1094
1898
   (0.0ms) RELEASE SAVEPOINT active_record_1
1095
-  (0.7ms) rollback transaction
1899
+  (0.8ms) rollback transaction
1096
1900
   (0.0ms) begin transaction
1097
1901
  -----------------------------------------------------------------------------------------------------------------------
1098
1902
  LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
1099
1903
  -----------------------------------------------------------------------------------------------------------------------
1100
1904
   (0.0ms) SAVEPOINT active_record_1
1101
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1905
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1102
1906
   (0.0ms) RELEASE SAVEPOINT active_record_1
1103
-  (1.0ms) rollback transaction
1907
+  (0.7ms) rollback transaction
1104
1908
   (0.0ms) begin transaction
1105
1909
  ------------------------------------------------------------------------------
1106
1910
  LargeTextField::OwnerTest: test_: a large text field should read from a file.
1107
1911
  ------------------------------------------------------------------------------
1108
1912
   (0.0ms) SAVEPOINT active_record_1
1109
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1913
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1110
1914
   (0.0ms) RELEASE SAVEPOINT active_record_1
1111
1915
   (0.0ms) SAVEPOINT active_record_1
1112
1916
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
@@ -1135,7 +1939,7 @@ LargeTextField::OwnerTest: test_: a large text field should reload changes when
1135
1939
   (0.0ms) RELEASE SAVEPOINT active_record_1
1136
1940
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1137
1941
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1138
-  (0.9ms) rollback transaction
1942
+  (0.7ms) rollback transaction
1139
1943
   (0.0ms) begin transaction
1140
1944
  -------------------------------------------------------------------------------------------------
1141
1945
  LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
@@ -1149,15 +1953,15 @@ LargeTextField::OwnerTest: test_: a large text field should singularize the erro
1149
1953
  LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
1150
1954
  ------------------------------------------------------------------------------------------------------------
1151
1955
   (0.0ms) SAVEPOINT active_record_1
1152
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1956
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1153
1957
   (0.0ms) RELEASE SAVEPOINT active_record_1
1154
-  (1.0ms) rollback transaction
1958
+  (0.8ms) rollback transaction
1155
1959
   (0.0ms) begin transaction
1156
1960
  -----------------------------------------------------------------------------------------
1157
1961
  LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
1158
1962
  -----------------------------------------------------------------------------------------
1159
1963
   (0.0ms) SAVEPOINT active_record_1
1160
- SQL (9.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1964
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1161
1965
   (0.0ms) RELEASE SAVEPOINT active_record_1
1162
1966
   (0.9ms) rollback transaction
1163
1967
   (0.0ms) begin transaction
@@ -1175,7 +1979,7 @@ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should
1175
1979
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
1176
1980
  --------------------------------------------------------------------------------------------------------------------
1177
1981
   (0.0ms) SAVEPOINT active_record_1
1178
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1982
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1179
1983
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
1180
1984
   (0.0ms) RELEASE SAVEPOINT active_record_1
1181
1985
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
@@ -1189,6 +1993,11 @@ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should
1189
1993
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1190
1994
   (0.0ms) rollback transaction
1191
1995
   (0.0ms) begin transaction
1996
+ ------------------------------
1997
+ LargeTextFieldTest: test_truth
1998
+ ------------------------------
1999
+  (0.0ms) rollback transaction
2000
+  (0.0ms) begin transaction
1192
2001
  ---------------------------------------------------------------------------------------------------
1193
2002
  LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
1194
2003
  ---------------------------------------------------------------------------------------------------
@@ -1208,11 +2017,6 @@ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to du
1208
2017
  --------------------------------------------------------------------------------------------------------------------------------
1209
2018
   (0.0ms) rollback transaction
1210
2019
   (0.0ms) begin transaction
1211
- ------------------------------
1212
- LargeTextFieldTest: test_truth
1213
- ------------------------------
1214
-  (0.0ms) rollback transaction
1215
-  (0.0ms) begin transaction
1216
2020
  --------------------------------------------------------------------------------------------------
1217
2021
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
1218
2022
  --------------------------------------------------------------------------------------------------
@@ -1230,7 +2034,7 @@ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should
1230
2034
   (0.0ms) RELEASE SAVEPOINT active_record_1
1231
2035
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]]
1232
2036
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1233
-  (0.9ms) rollback transaction
2037
+  (0.8ms) rollback transaction
1234
2038
   (0.0ms) begin transaction
1235
2039
  --------------------------------------------------------------------------------------------------------------------------
1236
2040
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
@@ -1258,7 +2062,7 @@ LargeTextField::NamedTextValueTest: test_: unique index should allow different o
1258
2062
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
1259
2063
   (0.0ms) RELEASE SAVEPOINT active_record_1
1260
2064
   (0.7ms) rollback transaction
1261
-  (0.1ms) begin transaction
2065
+  (0.0ms) begin transaction
1262
2066
  ------------------------------------------------------------------------------------------------------------------------------------
1263
2067
  LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
1264
2068
  ------------------------------------------------------------------------------------------------------------------------------------
@@ -1272,9 +2076,32 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
1272
2076
   (0.0ms) SAVEPOINT active_record_1
1273
2077
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
1274
2078
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1275
-  (0.8ms) rollback transaction
2079
+  (0.7ms) rollback transaction
1276
2080
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1277
2081
   (0.1ms) begin transaction
2082
+ ------------------------------
2083
+ LargeTextFieldTest: test_truth
2084
+ ------------------------------
2085
+  (0.0ms) rollback transaction
2086
+  (0.0ms) begin transaction
2087
+ ---------------------------------------------------------------------------------------------------
2088
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
2089
+ ---------------------------------------------------------------------------------------------------
2090
+  (0.0ms) SAVEPOINT active_record_1
2091
+ SQL (1.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
2092
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2093
+  (0.1ms) SAVEPOINT active_record_1
2094
+ SQL (0.7ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
2095
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2096
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2097
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2098
+  (0.8ms) rollback transaction
2099
+  (0.0ms) begin transaction
2100
+ --------------------------------------------------------------------------------------------------------------------------------
2101
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
2102
+ --------------------------------------------------------------------------------------------------------------------------------
2103
+  (0.0ms) rollback transaction
2104
+  (0.0ms) begin transaction
1278
2105
  --------------------------------------------------------------------------------------------------
1279
2106
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
1280
2107
  --------------------------------------------------------------------------------------------------
@@ -1284,14 +2111,14 @@ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should
1284
2111
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
1285
2112
  -----------------------------------------------------------------------------------------------------------------------
1286
2113
   (0.0ms) SAVEPOINT active_record_1
1287
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2114
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1288
2115
   (0.0ms) RELEASE SAVEPOINT active_record_1
1289
2116
   (0.0ms) SAVEPOINT active_record_1
1290
2117
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
1291
2118
   (0.0ms) RELEASE SAVEPOINT active_record_1
1292
2119
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
1293
2120
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1294
-  (1.6ms) rollback transaction
2121
+  (0.7ms) rollback transaction
1295
2122
   (0.0ms) begin transaction
1296
2123
  --------------------------------------------------------------------------------------------------------------------------
1297
2124
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
@@ -1316,7 +2143,7 @@ LargeTextField::NamedTextValueTest: test_: unique index should allow different o
1316
2143
   (0.0ms) SAVEPOINT active_record_1
1317
2144
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
1318
2145
   (0.0ms) RELEASE SAVEPOINT active_record_1
1319
-  (0.9ms) rollback transaction
2146
+  (0.7ms) rollback transaction
1320
2147
   (0.0ms) begin transaction
1321
2148
  ------------------------------------------------------------------------------------------------------------------------------------
1322
2149
  LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
@@ -1330,7 +2157,7 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
1330
2157
   (0.0ms) SAVEPOINT active_record_1
1331
2158
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
1332
2159
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1333
-  (0.6ms) rollback transaction
2160
+  (0.7ms) rollback transaction
1334
2161
   (0.0ms) begin transaction
1335
2162
  ----------------------------------------------------------------------------------------------------------
1336
2163
  LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
@@ -1338,20 +2165,20 @@ LargeTextField::OwnerTest: test_: a large text field should allow a custom maxim
1338
2165
   (0.0ms) SAVEPOINT active_record_1
1339
2166
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1340
2167
   (0.0ms) RELEASE SAVEPOINT active_record_1
1341
-  (1.0ms) rollback transaction
2168
+  (0.9ms) rollback transaction
1342
2169
   (0.0ms) begin transaction
1343
2170
  ---------------------------------------------------------------------------------------------------
1344
2171
  LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
1345
2172
  ---------------------------------------------------------------------------------------------------
1346
2173
   (0.0ms) SAVEPOINT active_record_1
1347
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2174
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1348
2175
   (0.0ms) RELEASE SAVEPOINT active_record_1
1349
2176
   (0.0ms) SAVEPOINT active_record_1
1350
2177
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1351
2178
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1352
2179
   (0.0ms) RELEASE SAVEPOINT active_record_1
1353
2180
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1354
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2181
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1355
2182
   (0.0ms) SAVEPOINT active_record_1
1356
2183
  SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
1357
2184
  SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
@@ -1366,7 +2193,7 @@ LargeTextField::OwnerTest: test_: a large text field should allow get and set wi
1366
2193
   (0.0ms) RELEASE SAVEPOINT active_record_1
1367
2194
   (0.0ms) SAVEPOINT active_record_1
1368
2195
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
1369
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2196
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1370
2197
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1371
2198
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1372
2199
   (0.0ms) SAVEPOINT active_record_1
@@ -1379,7 +2206,7 @@ LargeTextField::OwnerTest: test_: a large text field should allow get and set wi
1379
2206
   (0.0ms) RELEASE SAVEPOINT active_record_1
1380
2207
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1381
2208
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1382
-  (0.7ms) rollback transaction
2209
+  (0.8ms) rollback transaction
1383
2210
   (0.0ms) begin transaction
1384
2211
  ----------------------------------------------------------------------------------------
1385
2212
  LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
@@ -1391,15 +2218,15 @@ LargeTextField::OwnerTest: test_: a large text field should be able to be eager
1391
2218
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1392
2219
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1393
2220
   (0.0ms) RELEASE SAVEPOINT active_record_1
1394
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2221
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1395
2222
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
1396
-  (0.8ms) rollback transaction
1397
-  (0.0ms) begin transaction
2223
+  (0.9ms) rollback transaction
2224
+  (0.1ms) begin transaction
1398
2225
  ----------------------------------------------------------------------------------------------
1399
2226
  LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
1400
2227
  ----------------------------------------------------------------------------------------------
1401
2228
   (0.0ms) SAVEPOINT active_record_1
1402
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2229
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1403
2230
   (0.0ms) RELEASE SAVEPOINT active_record_1
1404
2231
   (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1405
2232
   (0.0ms) SAVEPOINT active_record_1
@@ -1409,11 +2236,11 @@ LargeTextField::OwnerTest: test_: a large text field should be able to update de
1409
2236
   (0.0ms) SAVEPOINT active_record_1
1410
2237
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1411
2238
   (0.0ms) RELEASE SAVEPOINT active_record_1
1412
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2239
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1413
2240
   (0.0ms) SAVEPOINT active_record_1
1414
2241
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1415
2242
   (0.0ms) RELEASE SAVEPOINT active_record_1
1416
-  (2.3ms) rollback transaction
2243
+  (0.7ms) rollback transaction
1417
2244
   (0.0ms) begin transaction
1418
2245
  ---------------------------------------------------------------------------------------------------
1419
2246
  LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
@@ -1437,11 +2264,11 @@ LargeTextField::OwnerTest: test_: a large text field should be cloned with the r
1437
2264
   (0.0ms) SAVEPOINT active_record_1
1438
2265
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
1439
2266
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
1440
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2267
+ SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1441
2268
   (0.0ms) RELEASE SAVEPOINT active_record_1
1442
2269
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
1443
2270
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
1444
-  (0.7ms) rollback transaction
2271
+  (0.8ms) rollback transaction
1445
2272
   (0.0ms) begin transaction
1446
2273
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
1447
2274
  LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
@@ -1449,14 +2276,14 @@ LargeTextField::OwnerTest: test_: a large text field should declare the associat
1449
2276
   (0.0ms) SAVEPOINT active_record_1
1450
2277
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1451
2278
   (0.0ms) RELEASE SAVEPOINT active_record_1
1452
-  (0.8ms) rollback transaction
2279
+  (0.7ms) rollback transaction
1453
2280
   (0.0ms) begin transaction
1454
2281
  ------------------------------------------------------------------------------------------------------
1455
2282
  LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
1456
2283
  ------------------------------------------------------------------------------------------------------
1457
2284
   (0.0ms) SAVEPOINT active_record_1
1458
2285
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1459
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2286
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1460
2287
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1461
2288
   (0.0ms) SAVEPOINT active_record_1
1462
2289
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
@@ -1470,7 +2297,7 @@ LargeTextField::OwnerTest: test_: a large text field should delete fields when t
1470
2297
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1471
2298
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1472
2299
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1473
-  (0.8ms) rollback transaction
2300
+  (0.7ms) rollback transaction
1474
2301
   (0.0ms) begin transaction
1475
2302
  ------------------------------------------------------------------------------------------------------------------
1476
2303
  LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
@@ -1478,18 +2305,18 @@ LargeTextField::OwnerTest: test_: a large text field should delete large text fi
1478
2305
   (0.0ms) SAVEPOINT active_record_1
1479
2306
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1480
2307
   (0.0ms) RELEASE SAVEPOINT active_record_1
1481
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
2308
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1482
2309
   (0.0ms) SAVEPOINT active_record_1
1483
2310
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1484
2311
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1485
2312
   (0.0ms) RELEASE SAVEPOINT active_record_1
1486
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
2313
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1487
2314
   (0.0ms) SAVEPOINT active_record_1
1488
2315
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1489
2316
  SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1490
2317
   (0.0ms) RELEASE SAVEPOINT active_record_1
1491
2318
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1492
-  (0.6ms) rollback transaction
2319
+  (0.8ms) rollback transaction
1493
2320
   (0.0ms) begin transaction
1494
2321
  --------------------------------------------------------------------------------------------------------------------
1495
2322
  LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
@@ -1500,10 +2327,10 @@ LargeTextField::OwnerTest: test_: a large text field should detect changes when
1500
2327
   (0.0ms) SAVEPOINT active_record_1
1501
2328
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1502
2329
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
1503
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2330
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1504
2331
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1505
2332
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1506
-  (1.3ms) rollback transaction
2333
+  (0.7ms) rollback transaction
1507
2334
   (0.0ms) begin transaction
1508
2335
  --------------------------------------------------------------------------------------------------------
1509
2336
  LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
@@ -1534,8 +2361,8 @@ LargeTextField::OwnerTest: test_: a large text field should not save fields that
1534
2361
   (0.0ms) RELEASE SAVEPOINT active_record_1
1535
2362
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1536
2363
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1537
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1538
-  (0.7ms) rollback transaction
2364
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
2365
+  (0.8ms) rollback transaction
1539
2366
   (0.0ms) begin transaction
1540
2367
  -------------------------------------------------------------------------------------------------------
1541
2368
  LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
@@ -1543,13 +2370,13 @@ LargeTextField::OwnerTest: test_: a large text field should only validate_large_
1543
2370
   (0.0ms) SAVEPOINT active_record_1
1544
2371
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1545
2372
   (0.0ms) RELEASE SAVEPOINT active_record_1
1546
-  (0.8ms) rollback transaction
2373
+  (0.7ms) rollback transaction
1547
2374
   (0.0ms) begin transaction
1548
2375
  -----------------------------------------------------------------------------------------------------------------------------------------------
1549
2376
  LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
1550
2377
  -----------------------------------------------------------------------------------------------------------------------------------------------
1551
2378
   (0.0ms) SAVEPOINT active_record_1
1552
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2379
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1553
2380
   (0.0ms) RELEASE SAVEPOINT active_record_1
1554
2381
   (0.7ms) rollback transaction
1555
2382
   (0.0ms) begin transaction
@@ -1558,15 +2385,15 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Intege
1558
2385
  -----------------------------------------------------------------------------------------------------------------------
1559
2386
   (0.0ms) SAVEPOINT active_record_1
1560
2387
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1561
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1562
-  (0.7ms) rollback transaction
2388
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2389
+  (0.8ms) rollback transaction
1563
2390
   (0.0ms) begin transaction
1564
2391
  ------------------------------------------------------------------------------
1565
2392
  LargeTextField::OwnerTest: test_: a large text field should read from a file.
1566
2393
  ------------------------------------------------------------------------------
1567
2394
   (0.0ms) SAVEPOINT active_record_1
1568
2395
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1569
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2396
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1570
2397
   (0.0ms) SAVEPOINT active_record_1
1571
2398
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1572
2399
   (0.0ms) RELEASE SAVEPOINT active_record_1
@@ -1574,8 +2401,8 @@ LargeTextField::OwnerTest: test_: a large text field should read from a file.
1574
2401
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
1575
2402
   (0.0ms) RELEASE SAVEPOINT active_record_1
1576
2403
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1577
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1578
-  (1.5ms) rollback transaction
2404
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
2405
+  (0.7ms) rollback transaction
1579
2406
   (0.0ms) begin transaction
1580
2407
  ------------------------------------------------------------------------------------------------------------------
1581
2408
  LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
@@ -1594,7 +2421,7 @@ LargeTextField::OwnerTest: test_: a large text field should reload changes when
1594
2421
   (0.0ms) RELEASE SAVEPOINT active_record_1
1595
2422
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1596
2423
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1597
-  (0.9ms) rollback transaction
2424
+  (0.7ms) rollback transaction
1598
2425
   (0.0ms) begin transaction
1599
2426
  -------------------------------------------------------------------------------------------------
1600
2427
  LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
@@ -1602,7 +2429,7 @@ LargeTextField::OwnerTest: test_: a large text field should singularize the erro
1602
2429
   (0.0ms) SAVEPOINT active_record_1
1603
2430
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1604
2431
   (0.0ms) RELEASE SAVEPOINT active_record_1
1605
-  (1.0ms) rollback transaction
2432
+  (0.8ms) rollback transaction
1606
2433
   (0.0ms) begin transaction
1607
2434
  ------------------------------------------------------------------------------------------------------------
1608
2435
  LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
@@ -1610,7 +2437,7 @@ LargeTextField::OwnerTest: test_: a large text field should support strings or s
1610
2437
   (0.0ms) SAVEPOINT active_record_1
1611
2438
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1612
2439
   (0.0ms) RELEASE SAVEPOINT active_record_1
1613
-  (0.9ms) rollback transaction
2440
+  (0.8ms) rollback transaction
1614
2441
   (0.0ms) begin transaction
1615
2442
  -----------------------------------------------------------------------------------------
1616
2443
  LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
@@ -1618,7 +2445,7 @@ LargeTextField::OwnerTest: test_: a large text field should validate the maximum
1618
2445
   (0.0ms) SAVEPOINT active_record_1
1619
2446
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1620
2447
   (0.0ms) RELEASE SAVEPOINT active_record_1
1621
-  (1.5ms) rollback transaction
2448
+  (1.6ms) rollback transaction
1622
2449
   (0.0ms) begin transaction
1623
2450
  ----------------------------------------------------------------------------------------------------------------
1624
2451
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
@@ -1628,7 +2455,7 @@ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should
1628
2455
   (0.0ms) RELEASE SAVEPOINT active_record_1
1629
2456
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1630
2457
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1631
-  (1.0ms) rollback transaction
2458
+  (0.8ms) rollback transaction
1632
2459
   (0.0ms) begin transaction
1633
2460
  --------------------------------------------------------------------------------------------------------------------
1634
2461
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
@@ -1639,62 +2466,40 @@ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should
1639
2466
   (0.0ms) RELEASE SAVEPOINT active_record_1
1640
2467
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1641
2468
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1642
-  (2.0ms) rollback transaction
1643
-  (0.1ms) begin transaction
2469
+  (0.7ms) rollback transaction
2470
+  (0.0ms) begin transaction
1644
2471
  -----------------------------------------------------------------------------------------------------------------
1645
2472
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
1646
2473
  -----------------------------------------------------------------------------------------------------------------
1647
2474
   (0.0ms) SAVEPOINT active_record_1
1648
2475
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1649
2476
   (0.0ms) rollback transaction
1650
-  (0.0ms) begin transaction
1651
- ------------------------------
1652
- LargeTextFieldTest: test_truth
1653
- ------------------------------
1654
-  (0.0ms) rollback transaction
1655
-  (0.0ms) begin transaction
1656
- ---------------------------------------------------------------------------------------------------
1657
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
1658
- ---------------------------------------------------------------------------------------------------
1659
-  (0.0ms) SAVEPOINT active_record_1
1660
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
1661
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
1662
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1663
-  (0.0ms) SAVEPOINT active_record_1
1664
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
1665
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1666
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1667
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1668
-  (0.7ms) rollback transaction
1669
-  (0.0ms) begin transaction
1670
- --------------------------------------------------------------------------------------------------------------------------------
1671
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
1672
- --------------------------------------------------------------------------------------------------------------------------------
1673
-  (0.0ms) rollback transaction
2477
+  (11.5ms) DROP TABLE `large_text_fields` CASCADE
2478
+  (22.7ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
2479
+  (41.1ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) 
2480
+  (2.9ms) DROP TABLE `libraries` CASCADE
2481
+  (16.0ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
2482
+  (8.5ms) SELECT version FROM `schema_migrations`
2483
+ ActiveRecord::SchemaMigration Load (1.8ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1674
2484
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1675
2485
   (0.1ms) begin transaction
1676
- ------------------------------
1677
- LargeTextFieldTest: test_truth
1678
- ------------------------------
1679
-  (0.0ms) rollback transaction
1680
-  (0.0ms) begin transaction
1681
2486
  --------------------------------------------------------------------------------------------------
1682
2487
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
1683
2488
  --------------------------------------------------------------------------------------------------
1684
-  (0.0ms) rollback transaction
2489
+  (0.1ms) rollback transaction
1685
2490
   (0.0ms) begin transaction
1686
2491
  -----------------------------------------------------------------------------------------------------------------------
1687
2492
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
1688
2493
  -----------------------------------------------------------------------------------------------------------------------
1689
2494
   (0.0ms) SAVEPOINT active_record_1
1690
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2495
+ SQL (1.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1691
2496
   (0.0ms) RELEASE SAVEPOINT active_record_1
1692
-  (0.0ms) SAVEPOINT active_record_1
1693
- SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
2497
+  (0.1ms) SAVEPOINT active_record_1
2498
+ SQL (0.7ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
1694
2499
   (0.0ms) RELEASE SAVEPOINT active_record_1
1695
- LargeTextField::NamedTextValue Load (0.2ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
2500
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
1696
2501
  Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1697
-  (0.7ms) rollback transaction
2502
+  (0.8ms) rollback transaction
1698
2503
   (0.0ms) begin transaction
1699
2504
  --------------------------------------------------------------------------------------------------------------------------
1700
2505
  LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
@@ -1704,11 +2509,11 @@ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should
1704
2509
  -------------------------------------------------------------------------------------------------------
1705
2510
  LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
1706
2511
  -------------------------------------------------------------------------------------------------------
1707
-  (0.0ms) SAVEPOINT active_record_1
1708
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1709
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2512
+  (0.1ms) SAVEPOINT active_record_1
2513
+ SQL (0.7ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2514
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1710
2515
   (0.0ms) SAVEPOINT active_record_1
1711
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
2516
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
1712
2517
   (0.0ms) RELEASE SAVEPOINT active_record_1
1713
2518
   (0.0ms) SAVEPOINT active_record_1
1714
2519
  SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
@@ -1716,10 +2521,10 @@ LargeTextField::NamedTextValueTest: test_: unique index should allow different o
1716
2521
   (0.0ms) SAVEPOINT active_record_1
1717
2522
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
1718
2523
   (0.0ms) RELEASE SAVEPOINT active_record_1
1719
-  (0.0ms) SAVEPOINT active_record_1
2524
+  (0.1ms) SAVEPOINT active_record_1
1720
2525
  SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
1721
2526
   (0.0ms) RELEASE SAVEPOINT active_record_1
1722
-  (0.6ms) rollback transaction
2527
+  (1.0ms) rollback transaction
1723
2528
   (0.0ms) begin transaction
1724
2529
  ------------------------------------------------------------------------------------------------------------------------------------
1725
2530
  LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
@@ -1735,14 +2540,45 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
1735
2540
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1736
2541
   (0.7ms) rollback transaction
1737
2542
   (0.0ms) begin transaction
2543
+ ---------------------------------------------------------------------------------------------------
2544
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
2545
+ ---------------------------------------------------------------------------------------------------
2546
+  (0.0ms) SAVEPOINT active_record_1
2547
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
2548
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2549
+  (0.0ms) SAVEPOINT active_record_1
2550
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
2551
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2552
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2553
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2554
+  (0.8ms) rollback transaction
2555
+  (0.1ms) begin transaction
2556
+ --------------------------------------------------------------------------------------------------------------------------------
2557
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
2558
+ --------------------------------------------------------------------------------------------------------------------------------
2559
+  (0.1ms) rollback transaction
2560
+  (0.0ms) begin transaction
1738
2561
  ----------------------------------------------------------------------------------------------------------
1739
2562
  LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
1740
2563
  ----------------------------------------------------------------------------------------------------------
1741
-  (0.0ms) SAVEPOINT active_record_1
2564
+  (0.1ms) SAVEPOINT active_record_1
1742
2565
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1743
2566
   (0.0ms) RELEASE SAVEPOINT active_record_1
1744
-  (0.8ms) rollback transaction
2567
+  (0.9ms) rollback transaction
1745
2568
   (0.0ms) begin transaction
2569
+ --------------------------------------------------------------------------------------------------------------
2570
+ LargeTextField::OwnerTest: test_: a large text field should allow a single argument to be passed into reload.
2571
+ --------------------------------------------------------------------------------------------------------------
2572
+  (0.0ms) SAVEPOINT active_record_1
2573
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2574
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2575
+  (0.0ms) SAVEPOINT active_record_1
2576
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2577
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
2578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2579
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1  [["id", 2]]
2580
+  (0.7ms) rollback transaction
2581
+  (0.1ms) begin transaction
1746
2582
  ---------------------------------------------------------------------------------------------------
1747
2583
  LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
1748
2584
  ---------------------------------------------------------------------------------------------------
@@ -1754,26 +2590,26 @@ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent
1754
2590
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1755
2591
   (0.0ms) RELEASE SAVEPOINT active_record_1
1756
2592
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1757
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2593
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1758
2594
   (0.0ms) SAVEPOINT active_record_1
1759
2595
  SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
1760
- SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
2596
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
1761
2597
   (0.0ms) RELEASE SAVEPOINT active_record_1
1762
-  (0.6ms) rollback transaction
2598
+  (1.0ms) rollback transaction
1763
2599
   (0.0ms) begin transaction
1764
2600
  ------------------------------------------------------------------------------------------------------
1765
2601
  LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
1766
2602
  ------------------------------------------------------------------------------------------------------
1767
2603
   (0.0ms) SAVEPOINT active_record_1
1768
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1769
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1770
-  (0.0ms) SAVEPOINT active_record_1
1771
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
1772
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1773
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1774
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1775
-  (0.0ms) SAVEPOINT active_record_1
1776
- SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
2604
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2605
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2606
+  (0.1ms) SAVEPOINT active_record_1
2607
+ SQL (0.4ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
2608
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2609
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2610
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2611
+  (0.1ms) SAVEPOINT active_record_1
2612
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
1777
2613
   (0.0ms) RELEASE SAVEPOINT active_record_1
1778
2614
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1779
2615
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
@@ -1782,7 +2618,7 @@ LargeTextField::OwnerTest: test_: a large text field should allow get and set wi
1782
2618
   (0.0ms) RELEASE SAVEPOINT active_record_1
1783
2619
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1784
2620
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1785
-  (0.9ms) rollback transaction
2621
+  (1.0ms) rollback transaction
1786
2622
   (0.0ms) begin transaction
1787
2623
  ----------------------------------------------------------------------------------------
1788
2624
  LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
@@ -1792,7 +2628,7 @@ LargeTextField::OwnerTest: test_: a large text field should be able to be eager
1792
2628
   (0.0ms) RELEASE SAVEPOINT active_record_1
1793
2629
   (0.0ms) SAVEPOINT active_record_1
1794
2630
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1795
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
2631
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1796
2632
   (0.1ms) RELEASE SAVEPOINT active_record_1
1797
2633
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1798
2634
  LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
@@ -1805,7 +2641,7 @@ LargeTextField::OwnerTest: test_: a large text field should be able to update de
1805
2641
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1806
2642
   (0.0ms) RELEASE SAVEPOINT active_record_1
1807
2643
   (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1808
-  (0.0ms) SAVEPOINT active_record_1
2644
+  (0.1ms) SAVEPOINT active_record_1
1809
2645
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1810
2646
   (0.0ms) RELEASE SAVEPOINT active_record_1
1811
2647
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
@@ -1815,14 +2651,14 @@ LargeTextField::OwnerTest: test_: a large text field should be able to update de
1815
2651
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1816
2652
   (0.0ms) SAVEPOINT active_record_1
1817
2653
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1818
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1819
-  (0.7ms) rollback transaction
2654
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2655
+  (0.8ms) rollback transaction
1820
2656
   (0.0ms) begin transaction
1821
2657
  ---------------------------------------------------------------------------------------------------
1822
2658
  LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
1823
2659
  ---------------------------------------------------------------------------------------------------
1824
2660
   (0.0ms) SAVEPOINT active_record_1
1825
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2661
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1826
2662
   (0.0ms) RELEASE SAVEPOINT active_record_1
1827
2663
   (0.0ms) SAVEPOINT active_record_1
1828
2664
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
@@ -1830,21 +2666,21 @@ LargeTextField::OwnerTest: test_: a large text field should be cloned with the r
1830
2666
   (0.0ms) RELEASE SAVEPOINT active_record_1
1831
2667
   (0.0ms) SAVEPOINT active_record_1
1832
2668
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1833
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
2669
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1834
2670
  SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
1835
2671
   (0.0ms) RELEASE SAVEPOINT active_record_1
1836
2672
   (0.0ms) SAVEPOINT active_record_1
1837
2673
   (0.0ms) RELEASE SAVEPOINT active_record_1
1838
2674
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1839
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2675
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1840
2676
   (0.0ms) SAVEPOINT active_record_1
1841
2677
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
1842
2678
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
1843
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2679
+ SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1844
2680
   (0.0ms) RELEASE SAVEPOINT active_record_1
1845
2681
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
1846
2682
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
1847
-  (0.9ms) rollback transaction
2683
+  (0.7ms) rollback transaction
1848
2684
   (0.0ms) begin transaction
1849
2685
  -------------------------------------------------------------------------------------------------------------------------------------------------------------
1850
2686
  LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
@@ -1852,8 +2688,8 @@ LargeTextField::OwnerTest: test_: a large text field should declare the associat
1852
2688
   (0.0ms) SAVEPOINT active_record_1
1853
2689
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1854
2690
   (0.0ms) RELEASE SAVEPOINT active_record_1
1855
-  (0.7ms) rollback transaction
1856
-  (0.0ms) begin transaction
2691
+  (1.3ms) rollback transaction
2692
+  (0.1ms) begin transaction
1857
2693
  ------------------------------------------------------------------------------------------------------
1858
2694
  LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
1859
2695
  ------------------------------------------------------------------------------------------------------
@@ -1862,10 +2698,10 @@ LargeTextField::OwnerTest: test_: a large text field should delete fields when t
1862
2698
   (0.0ms) RELEASE SAVEPOINT active_record_1
1863
2699
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1864
2700
   (0.0ms) SAVEPOINT active_record_1
1865
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2701
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1866
2702
   (0.0ms) RELEASE SAVEPOINT active_record_1
1867
2703
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1868
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2704
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1869
2705
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1870
2706
   (0.0ms) SAVEPOINT active_record_1
1871
2707
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
@@ -1883,16 +2719,16 @@ LargeTextField::OwnerTest: test_: a large text field should delete large text fi
1883
2719
   (0.0ms) RELEASE SAVEPOINT active_record_1
1884
2720
   (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1885
2721
   (0.0ms) SAVEPOINT active_record_1
1886
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2722
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1887
2723
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1888
2724
   (0.0ms) RELEASE SAVEPOINT active_record_1
1889
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
2725
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1890
2726
   (0.0ms) SAVEPOINT active_record_1
1891
2727
  SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1892
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2728
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1893
2729
   (0.0ms) RELEASE SAVEPOINT active_record_1
1894
2730
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1895
-  (0.7ms) rollback transaction
2731
+  (0.8ms) rollback transaction
1896
2732
   (0.0ms) begin transaction
1897
2733
  --------------------------------------------------------------------------------------------------------------------
1898
2734
  LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
@@ -1906,7 +2742,7 @@ LargeTextField::OwnerTest: test_: a large text field should detect changes when
1906
2742
   (0.0ms) RELEASE SAVEPOINT active_record_1
1907
2743
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1908
2744
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1909
-  (0.9ms) rollback transaction
2745
+  (1.4ms) rollback transaction
1910
2746
   (0.0ms) begin transaction
1911
2747
  --------------------------------------------------------------------------------------------------------
1912
2748
  LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
@@ -1929,13 +2765,13 @@ LargeTextField::OwnerTest: test_: a large text field should forget about changes
1929
2765
  LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
1930
2766
  ---------------------------------------------------------------------------------------------------
1931
2767
   (0.0ms) SAVEPOINT active_record_1
1932
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2768
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1933
2769
   (0.0ms) RELEASE SAVEPOINT active_record_1
1934
2770
   (0.0ms) SAVEPOINT active_record_1
1935
2771
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
1936
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1937
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1938
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2772
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
2773
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2774
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1939
2775
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1940
2776
   (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1941
2777
   (0.9ms) rollback transaction
@@ -1944,9 +2780,9 @@ LargeTextField::OwnerTest: test_: a large text field should not save fields that
1944
2780
  LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
1945
2781
  -------------------------------------------------------------------------------------------------------
1946
2782
   (0.0ms) SAVEPOINT active_record_1
1947
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1948
-  (9.1ms) RELEASE SAVEPOINT active_record_1
1949
-  (0.9ms) rollback transaction
2783
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2784
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2785
+  (1.3ms) rollback transaction
1950
2786
   (0.0ms) begin transaction
1951
2787
  -----------------------------------------------------------------------------------------------------------------------------------------------
1952
2788
  LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
@@ -1954,7 +2790,7 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a custom max
1954
2790
   (0.0ms) SAVEPOINT active_record_1
1955
2791
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1956
2792
   (0.0ms) RELEASE SAVEPOINT active_record_1
1957
-  (1.0ms) rollback transaction
2793
+  (1.3ms) rollback transaction
1958
2794
   (0.0ms) begin transaction
1959
2795
  -----------------------------------------------------------------------------------------------------------------------
1960
2796
  LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
@@ -1962,13 +2798,13 @@ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Intege
1962
2798
   (0.0ms) SAVEPOINT active_record_1
1963
2799
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1964
2800
   (0.0ms) RELEASE SAVEPOINT active_record_1
1965
-  (1.0ms) rollback transaction
1966
-  (0.0ms) begin transaction
2801
+  (1.5ms) rollback transaction
2802
+  (0.1ms) begin transaction
1967
2803
  ------------------------------------------------------------------------------
1968
2804
  LargeTextField::OwnerTest: test_: a large text field should read from a file.
1969
2805
  ------------------------------------------------------------------------------
1970
2806
   (0.0ms) SAVEPOINT active_record_1
1971
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2807
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1972
2808
   (0.0ms) RELEASE SAVEPOINT active_record_1
1973
2809
   (0.0ms) SAVEPOINT active_record_1
1974
2810
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
@@ -1978,14 +2814,14 @@ LargeTextField::OwnerTest: test_: a large text field should read from a file.
1978
2814
   (0.0ms) RELEASE SAVEPOINT active_record_1
1979
2815
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1980
2816
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1981
-  (0.9ms) rollback transaction
2817
+  (0.8ms) rollback transaction
1982
2818
   (0.0ms) begin transaction
1983
2819
  ------------------------------------------------------------------------------------------------------------------
1984
2820
  LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
1985
2821
  ------------------------------------------------------------------------------------------------------------------
1986
2822
   (0.0ms) SAVEPOINT active_record_1
1987
2823
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1988
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2824
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1989
2825
   (0.0ms) SAVEPOINT active_record_1
1990
2826
  SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1991
2827
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
@@ -1997,23 +2833,23 @@ LargeTextField::OwnerTest: test_: a large text field should reload changes when
1997
2833
   (0.0ms) RELEASE SAVEPOINT active_record_1
1998
2834
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1999
2835
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
2000
-  (0.8ms) rollback transaction
2001
-  (0.0ms) begin transaction
2836
+  (1.1ms) rollback transaction
2837
+  (0.1ms) begin transaction
2002
2838
  -------------------------------------------------------------------------------------------------
2003
2839
  LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
2004
2840
  -------------------------------------------------------------------------------------------------
2005
2841
   (0.0ms) SAVEPOINT active_record_1
2006
2842
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2007
2843
   (0.0ms) RELEASE SAVEPOINT active_record_1
2008
-  (1.1ms) rollback transaction
2844
+  (1.0ms) rollback transaction
2009
2845
   (0.0ms) begin transaction
2010
2846
  ------------------------------------------------------------------------------------------------------------
2011
2847
  LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
2012
2848
  ------------------------------------------------------------------------------------------------------------
2013
2849
   (0.0ms) SAVEPOINT active_record_1
2014
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2850
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2015
2851
   (0.0ms) RELEASE SAVEPOINT active_record_1
2016
-  (1.1ms) rollback transaction
2852
+  (0.8ms) rollback transaction
2017
2853
   (0.0ms) begin transaction
2018
2854
  -----------------------------------------------------------------------------------------
2019
2855
  LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
@@ -2021,51 +2857,37 @@ LargeTextField::OwnerTest: test_: a large text field should validate the maximum
2021
2857
   (0.0ms) SAVEPOINT active_record_1
2022
2858
  SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2023
2859
   (0.0ms) RELEASE SAVEPOINT active_record_1
2024
-  (1.1ms) rollback transaction
2860
+  (0.9ms) rollback transaction
2025
2861
   (0.0ms) begin transaction
2026
2862
  ----------------------------------------------------------------------------------------------------------------
2027
2863
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
2028
2864
  ----------------------------------------------------------------------------------------------------------------
2029
2865
   (0.0ms) SAVEPOINT active_record_1
2030
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2866
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2031
2867
   (0.0ms) RELEASE SAVEPOINT active_record_1
2032
2868
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2033
2869
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2034
-  (1.0ms) rollback transaction
2035
-  (0.0ms) begin transaction
2870
+  (1.2ms) rollback transaction
2871
+  (0.1ms) begin transaction
2036
2872
  --------------------------------------------------------------------------------------------------------------------
2037
2873
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
2038
2874
  --------------------------------------------------------------------------------------------------------------------
2039
2875
   (0.0ms) SAVEPOINT active_record_1
2040
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2876
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2041
2877
  SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
2042
2878
   (0.0ms) RELEASE SAVEPOINT active_record_1
2043
2879
  Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2044
2880
  LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2045
2881
   (0.8ms) rollback transaction
2046
-  (0.0ms) begin transaction
2882
+  (0.1ms) begin transaction
2047
2883
  -----------------------------------------------------------------------------------------------------------------
2048
2884
  LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
2049
2885
  -----------------------------------------------------------------------------------------------------------------
2050
2886
   (0.0ms) SAVEPOINT active_record_1
2051
2887
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2052
2888
   (0.0ms) rollback transaction
2053
-  (0.0ms) begin transaction
2054
- ---------------------------------------------------------------------------------------------------
2055
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
2056
- ---------------------------------------------------------------------------------------------------
2057
-  (0.0ms) SAVEPOINT active_record_1
2058
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
2059
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
2060
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2061
-  (0.0ms) SAVEPOINT active_record_1
2062
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
2063
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2064
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2065
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2066
-  (0.7ms) rollback transaction
2067
-  (0.0ms) begin transaction
2068
- --------------------------------------------------------------------------------------------------------------------------------
2069
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
2070
- --------------------------------------------------------------------------------------------------------------------------------
2071
-  (0.0ms) rollback transaction
2889
+  (0.1ms) begin transaction
2890
+ ------------------------------
2891
+ LargeTextFieldTest: test_truth
2892
+ ------------------------------
2893
+  (0.0ms) rollback transaction