This project is archived and is in readonly mode.
Not unique table/alias:
Reported by tispratik | March 19th, 2010 @ 06:18 AM
Rails 2.3.5
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activerecord-tableless (0.1.0)
activeresource (2.3.5)
activesupport (2.3.5)
Models:
class Task < ActiveRecord::Base
set_table_name 'tasks' has_one :modul, :as => :modulable
accepts_nested_attributes_for :modul end
class Modul < ActiveRecord::Base
set_table_name 'backstage1_2dev.moduls' has_many
:users, :through => :roles belongs_to :modulable, :polymorphic
=> true end
Task.all(:include => [:taskAssignedTo, {:modul => [:creator, :updator, :parent]}])
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:219:in
log': Mysql::Error: Not unique table/alias: 'moduls':
SELECT
tasks.
idAS
t0_r0,
tasks.
assign_toAS
t0_r1,
tasks.
due_dateAS
t0_r2,
tasks.
dispositionAS
t0_r3,
tasks.
task_typeAS
t0_r4,
tasks.
priorityAS
t0_r5,
users.
idAS
t1_r0,
users.
usernameAS
t1_r1,
users.
first_nameAS
t1_r2,
users.
last_nameAS
t1_r3,
users.
one_line_bioAS
t1_r4,
users.
dobAS
t1_r5,
users.
crypted_passwordAS
t1_r6,
users.
password_saltAS
t1_r7,
users.
persistence_tokenAS
t1_r8,
users.
single_access_tokenAS
t1_r9,
users.
perishable_tokenAS
t1_r10,
users.
last_login_ipAS
t1_r11,
users.
last_login_atAS
t1_r12,
users.
is_dp_gravatarAS
t1_r13,
backstage1_2dev.
moduls.
idAS
t2_r0,
backstage1_2dev.
moduls.
nameAS
t2_r1,
backstage1_2dev.
moduls.
aliasAS
t2_r2,
backstage1_2dev.
moduls.
descriptionAS
t2_r3,
backstage1_2dev.
moduls.
is_pubAS
t2_r4,
backstage1_2dev.
moduls.
statusAS
t2_r5,
backstage1_2dev.
moduls.
modulable_typeAS
t2_r6,
backstage1_2dev.
moduls.
modulable_idAS
t2_r7,
backstage1_2dev.
moduls.
parent_idAS
t2_r8,
backstage1_2dev.
moduls.
created_byAS
t2_r9,
backstage1_2dev.
moduls.
updated_byAS
t2_r10,
backstage1_2dev.
moduls.
created_atAS
t2_r11,
backstage1_2dev.
moduls.
updated_atAS
t2_r12,
creators_backstage1_2dev_moduls.
idAS
t3_r0,
creators_backstage1_2dev_moduls.
usernameAS
t3_r1,
creators_backstage1_2dev_moduls.
first_nameAS
t3_r2,
creators_backstage1_2dev_moduls.
last_nameAS
t3_r3,
creators_backstage1_2dev_moduls.
one_line_bioAS
t3_r4,
creators_backstage1_2dev_moduls.
dobAS
t3_r5,
creators_backstage1_2dev_moduls.
crypted_passwordAS
t3_r6,
creators_backstage1_2dev_moduls.
password_saltAS
t3_r7,
creators_backstage1_2dev_moduls.
persistence_tokenAS
t3_r8,
creators_backstage1_2dev_moduls.
single_access_tokenAS
t3_r9,
creators_backstage1_2dev_moduls.
perishable_tokenAS
t3_r10,
creators_backstage1_2dev_moduls.
last_login_ipAS
t3_r11,
creators_backstage1_2dev_moduls.
last_login_atAS
t3_r12,
creators_backstage1_2dev_moduls.
is_dp_gravatarAS
t3_r13,
updators_backstage1_2dev_moduls.
idAS
t4_r0,
updators_backstage1_2dev_moduls.
usernameAS
t4_r1,
updators_backstage1_2dev_moduls.
first_nameAS
t4_r2,
updators_backstage1_2dev_moduls.
last_nameAS
t4_r3,
updators_backstage1_2dev_moduls.
one_line_bioAS
t4_r4,
updators_backstage1_2dev_moduls.
dobAS
t4_r5,
updators_backstage1_2dev_moduls.
crypted_passwordAS
t4_r6,
updators_backstage1_2dev_moduls.
password_saltAS
t4_r7,
updators_backstage1_2dev_moduls.
persistence_tokenAS
t4_r8,
updators_backstage1_2dev_moduls.
single_access_tokenAS
t4_r9,
updators_backstage1_2dev_moduls.
perishable_tokenAS
t4_r10,
updators_backstage1_2dev_moduls.
last_login_ipAS
t4_r11,
updators_backstage1_2dev_moduls.
last_login_atAS
t4_r12,
updators_backstage1_2dev_moduls.
is_dp_gravatarAS
t4_r13,
parents_backstage1_2dev_moduls.
idAS
t5_r0,
parents_backstage1_2dev_moduls.
nameAS
t5_r1,
parents_backstage1_2dev_moduls.
aliasAS
t5_r2,
parents_backstage1_2dev_moduls.
descriptionAS
t5_r3,
parents_backstage1_2dev_moduls.
is_pubAS
t5_r4,
parents_backstage1_2dev_moduls.
statusAS
t5_r5,
parents_backstage1_2dev_moduls.
modulable_typeAS
t5_r6,
parents_backstage1_2dev_moduls.
modulable_idAS
t5_r7,
parents_backstage1_2dev_moduls.
parent_idAS
t5_r8,
parents_backstage1_2dev_moduls.
created_byAS
t5_r9,
parents_backstage1_2dev_moduls.
updated_byAS
t5_r10,
parents_backstage1_2dev_moduls.
created_atAS
t5_r11,
parents_backstage1_2dev_moduls.
updated_atAS
t5_r12 FROM
tasks LEFT OUTER
JOIN
usersON
users.id
=
tasks.assign_to LEFT OUTER
JOIN
backstage1_2dev.
modulsON
backstage1_2dev.
moduls.modulable_id
=
tasks.id
AND
backstage1_2dev.
moduls.modulable_type
= 'Task' LEFT OUTER
JOIN
userscreators_backstage1_2dev_moduls
ON
creators_backstage1_2dev_moduls.id
=
backstage1_2dev.
moduls.created_by LEFT
OUTER JOIN
usersupdators_backstage1_2dev_moduls
ON
updators_backstage1_2dev_moduls.id
=
backstage1_2dev.
moduls.updated_by LEFT
OUTER
JOIN
backstage1_2dev.
modulsparents_backstage1_2dev_moduls
ON
parents_backstage1_2dev_moduls.id
=
backstage1_2dev.
moduls.parent_id INNER
JOIN
backstage1_2dev.
modulsON
backstage1_2dev.
moduls.modulable_id
=
tasks.id
AND
backstage1_2dev.
moduls.modulable_type
= 'Task' WHERE ((backstage1_2dev.moduls.status = 6) AND
(backstage1_2dev.moduls.created_by = 1)) ORDER BY
backstage1_2dev.moduls.created_at DESC
ActiveRecord::StatementInvalid in TasksController#index
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:219:in
log': Mysql::Error: Not unique table/alias: 'moduls':
SELECT
tasks.
idAS
t0_r0,
tasks.
assign_toAS
t0_r1,
tasks.
due_dateAS
t0_r2,
tasks.
dispositionAS
t0_r3,
tasks.
task_typeAS
t0_r4,
tasks.
priorityAS
t0_r5,
launchpad_dev.
users.
idAS
t1_r0,
launchpad_dev.
users.
usernameAS
t1_r1,
launchpad_dev.
users.
first_nameAS
t1_r2,
launchpad_dev.
users.
last_nameAS
t1_r3,
launchpad_dev.
users.
one_line_bioAS
t1_r4,
launchpad_dev.
users.
dobAS
t1_r5,
launchpad_dev.
users.
crypted_passwordAS
t1_r6,
launchpad_dev.
users.
password_saltAS
t1_r7,
launchpad_dev.
users.
persistence_tokenAS
t1_r8,
launchpad_dev.
users.
single_access_tokenAS
t1_r9,
launchpad_dev.
users.
perishable_tokenAS
t1_r10,
launchpad_dev.
users.
last_login_ipAS
t1_r11,
launchpad_dev.
users.
last_login_atAS
t1_r12,
launchpad_dev.
users.
is_dp_gravatarAS
t1_r13,
backstage1_2dev.
moduls.
idAS
t2_r0,
backstage1_2dev.
moduls.
nameAS
t2_r1,
backstage1_2dev.
moduls.
aliasAS
t2_r2,
backstage1_2dev.
moduls.
descriptionAS
t2_r3,
backstage1_2dev.
moduls.
is_pubAS
t2_r4,
backstage1_2dev.
moduls.
statusAS
t2_r5,
backstage1_2dev.
moduls.
modulable_typeAS
t2_r6,
backstage1_2dev.
moduls.
modulable_idAS
t2_r7,
backstage1_2dev.
moduls.
parent_idAS
t2_r8,
backstage1_2dev.
moduls.
created_byAS
t2_r9,
backstage1_2dev.
moduls.
updated_byAS
t2_r10,
backstage1_2dev.
moduls.
created_atAS
t2_r11,
backstage1_2dev.
moduls.
updated_atAS
t2_r12,
creators_backstage1_2dev_moduls.
idAS
t3_r0,
creators_backstage1_2dev_moduls.
usernameAS
t3_r1,
creators_backstage1_2dev_moduls.
first_nameAS
t3_r2,
creators_backstage1_2dev_moduls.
last_nameAS
t3_r3,
creators_backstage1_2dev_moduls.
one_line_bioAS
t3_r4,
creators_backstage1_2dev_moduls.
dobAS
t3_r5,
creators_backstage1_2dev_moduls.
crypted_passwordAS
t3_r6,
creators_backstage1_2dev_moduls.
password_saltAS
t3_r7,
creators_backstage1_2dev_moduls.
persistence_tokenAS
t3_r8,
creators_backstage1_2dev_moduls.
single_access_tokenAS
t3_r9,
creators_backstage1_2dev_moduls.
perishable_tokenAS
t3_r10,
creators_backstage1_2dev_moduls.
last_login_ipAS
t3_r11,
creators_backstage1_2dev_moduls.
last_login_atAS
t3_r12,
creators_backstage1_2dev_moduls.
is_dp_gravatarAS
t3_r13,
updators_backstage1_2dev_moduls.
idAS
t4_r0,
updators_backstage1_2dev_moduls.
usernameAS
t4_r1,
updators_backstage1_2dev_moduls.
first_nameAS
t4_r2,
updators_backstage1_2dev_moduls.
last_nameAS
t4_r3,
updators_backstage1_2dev_moduls.
one_line_bioAS
t4_r4,
updators_backstage1_2dev_moduls.
dobAS
t4_r5,
updators_backstage1_2dev_moduls.
crypted_passwordAS
t4_r6,
updators_backstage1_2dev_moduls.
password_saltAS
t4_r7,
updators_backstage1_2dev_moduls.
persistence_tokenAS
t4_r8,
updators_backstage1_2dev_moduls.
single_access_tokenAS
t4_r9,
updators_backstage1_2dev_moduls.
perishable_tokenAS
t4_r10,
updators_backstage1_2dev_moduls.
last_login_ipAS
t4_r11,
updators_backstage1_2dev_moduls.
last_login_atAS
t4_r12,
updators_backstage1_2dev_moduls.
is_dp_gravatarAS
t4_r13,
parents_backstage1_2dev_moduls.
idAS
t5_r0,
parents_backstage1_2dev_moduls.
nameAS
t5_r1,
parents_backstage1_2dev_moduls.
aliasAS
t5_r2,
parents_backstage1_2dev_moduls.
descriptionAS
t5_r3,
parents_backstage1_2dev_moduls.
is_pubAS
t5_r4,
parents_backstage1_2dev_moduls.
statusAS
t5_r5,
parents_backstage1_2dev_moduls.
modulable_typeAS
t5_r6,
parents_backstage1_2dev_moduls.
modulable_idAS
t5_r7,
parents_backstage1_2dev_moduls.
parent_idAS
t5_r8,
parents_backstage1_2dev_moduls.
created_byAS
t5_r9,
parents_backstage1_2dev_moduls.
updated_byAS
t5_r10,
parents_backstage1_2dev_moduls.
created_atAS
t5_r11,
parents_backstage1_2dev_moduls.
updated_atAS
t5_r12 FROM
tasks LEFT OUTER
JOIN
launchpad_dev.
usersON
launchpad_dev.
users.id
=
tasks.assign_to LEFT OUTER
JOIN
backstage1_2dev.
modulsON
backstage1_2dev.
moduls.modulable_id
=
tasks.id
AND
backstage1_2dev.
moduls.modulable_type
= 'Task' LEFT OUTER
JOIN
launchpad_dev.
userscreators_backstage1_2dev_moduls
ON
creators_backstage1_2dev_moduls.id
=
backstage1_2dev.
moduls.created_by LEFT
OUTER
JOIN
launchpad_dev.
usersupdators_backstage1_2dev_moduls
ON
updators_backstage1_2dev_moduls.id
=
backstage1_2dev.
moduls.updated_by LEFT
OUTER
JOIN
backstage1_2dev.
modulsparents_backstage1_2dev_moduls
ON
parents_backstage1_2dev_moduls.id
=
backstage1_2dev.
moduls.parent_id INNER
JOIN
backstage1_2dev.
modulsON
backstage1_2dev.
moduls.modulable_id
=
tasks.id
AND
backstage1_2dev.
moduls.modulable_type
= 'Task' WHERE ((backstage1_2dev.moduls.status = 6) AND
(backstage1_2dev.moduls.created_by = 1)) ORDER BY
backstage1_2dev.moduls.created_at DESC<br/> RAILS_ROOT:
C:/rubyonrails/rails_apps/backstagev1.2
Application Trace | Framework Trace | Full Trace
C:/rubyonrails/rails_apps/backstagev1.2/app/controllers/tasks_controller.rb:14:in
index'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:323:in
execute'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:608:in
select'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in
select_all_without_query_cache'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in
select_all'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in
cache_sql'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in
select_all'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1617:in
select_all_rows'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1395:in
find_with_associations'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1393:in
catch'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1393:in
find_with_associations'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1546:in
find_every'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:615:in
find'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:635:in
all'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:178:in
send'<br/>
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:178:in
method_missing'
C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2143:in
with_scope'<br/>
C:1:in
send'
C:1:in with_scope'<br/>
C:1:in
send'
C:1:in with_scope'<br/> (eval):1:in
index'
Comments and changes to this ticket
-
José Valim March 27th, 2010 @ 01:53 PM
- State changed from new to incomplete
Can you please isolate the issue or provide a failing test case?
-
tispratik April 14th, 2010 @ 06:28 AM
- Tag changed from has_many_association, table_alias to database_alias, has_many_association, table_alias
This is related to the above problem:
I have 3 models, Project, ProjectRole and User. The tables are distributed in two databases.
Databases:
Database X:
usersDatabase Y:
projects project_roles
Models:
class Project < ActiveRecord::Base
has_many :project_roles has_many :users, :through => :project_roles endclass ProjectRole < ActiveRecord::Base
belongs_to :project belongs_to :user endclass User < ActiveRecord::Base
establish_connection :X has_many :project_roles has_many :projects, :through => :project_roles end
Now when i try to access users from project:
p = Project.first +----+-----------+-------+ | id | name | alias | +----+-----------+-------+ | 1 | Jerde L | PRO | +----+-----------+-------+
p.users Hirb Error: Mysql::Error: Table 'X.project_roles' doesn't exist: SELECT
users
.* FROMusers
INNER JOINproject_roles
ONusers
.id =project_roles
.user_id WHERE ((project_roles
.project_id = 1))C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:608:in `select' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:661:in `find_by_sql' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1548:in `find_every' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:615:in `find' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/has_many_through_association.rb:83:in `find_target' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_collection.rb:354:in `load_target' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:212:in `method_missing' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' c:/rubyonrails/rails_apps/test_project/vendor/gems/will_paginate-2.3.12/lib/will_paginate/finder.rb:170:in `method_missing' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/hirb-0.3.1/lib/hirb/formatter.rb:78:in `determine_output_class' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/hirb-0.3.1/lib/hirb/formatter.rb:48:in `format_output' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/hirb-0.3.1/lib/hirb/view.rb:213:in `render_output' C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/hirb-0.3.1/lib/hirb/view.rb:126:in `view_output'
BUT: Getting projects from users works just fine.
u = User.first +----+------------+ | id | username | +----+------------+ | 1 | dummy | +----+------------+
u.projects +----+----------------+-------+ | id | name | alias | +----+----------------+-------+ | 1 | Jerde L | PRO | | 2 | Spinka Group | PRO | | 3 | Mosciski LLC | PRO | +----+----------------+-------+
-
Mike Riley July 29th, 2010 @ 04:25 PM
- State changed from incomplete to resolved
- Importance changed from to Low
Hello,
Due to the date since the last update and because it is incomplete, I am going to close this ticket. If you can provide a failing test case we can investigate this further.
Mike Riley
-
Vladimir Meremyanin May 13th, 2011 @ 08:13 AM
I doubt it's the same problem as topic starter had, but symptoms are very similary. Here is the test:
def test_do_not_duplicate_table_name_used_in_has_many_through_and_joins author = Author.first assert_nothing_raised { author.comments.joins(:post).order(Post.arel_table[:title]).first } end
And here how it fails run against freshly checked rails from github master:
$ rake test_sqlite3 TEST=test/cases/relations_test.rb (in /Users/stiff/workspace/rails/activerecord) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -I"lib:test:test/connections/native_sqlite3" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/cases/relations_test.rb" /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:195: warning: instance variable @checked_for_sudo not initialized Using native SQLite3 Loaded suite /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader Started ...................F....................................................................................... Finished in 1.026683 seconds. 1) Failure: test_do_not_duplicate_table_name_used_in_has_many_through_and_joins(RelationTest) [./test/cases/relations_test.rb:26:in `test_do_not_duplicate_table_name_used_in_has_many_through_and_joins' /Users/stiff/workspace/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__' /Users/stiff/workspace/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run' /Users/stiff/workspace/rails/activesupport/lib/active_support/callbacks.rb:408:in `_run_setup_callbacks' /Users/stiff/workspace/rails/activesupport/lib/active_support/callbacks.rb:81:in `send' /Users/stiff/workspace/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/stiff/workspace/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run']: Exception raised: Class: <ActiveRecord::StatementInvalid> Message: <"SQLite3::SQLException: ambiguous column name: posts.author_id: SELECT \"comments\".* FROM \"comments\" INNER JOIN \"posts\" ON \"posts\".\"id\" = \"comments\".\"post_id\" INNER JOIN \"posts\" ON \"comments\".\"post_id\" = \"posts\".\"id\" WHERE \"posts\".\"author_id\" = 1 ORDER BY \"posts\".\"title\" LIMIT 1"> ---Backtrace--- /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:91:in `initialize' /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:91:in `new' /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/lib/sqlite3/database.rb:91:in `prepare' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:165:in `exec_query' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:222:in `log' /Users/stiff/workspace/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:217:in `log' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:161:in `exec_query' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:372:in `select' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:9:in `select_all' /Users/stiff/workspace/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all' /Users/stiff/workspace/rails/activerecord/lib/active_record/base.rb:469:in `find_by_sql' /Users/stiff/workspace/rails/activerecord/lib/active_record/relation.rb:106:in `to_a' /Users/stiff/workspace/rails/activerecord/lib/active_record/relation/finder_methods.rb:370:in `find_first' /Users/stiff/workspace/rails/activerecord/lib/active_record/relation/finder_methods.rb:122:in `first' ./test/cases/relations_test.rb:26:in `test_do_not_duplicate_table_name_used_in_has_many_through_and_joins' ./test/cases/relations_test.rb:26:in `test_do_not_duplicate_table_name_used_in_has_many_through_and_joins' /Users/stiff/workspace/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__' /Users/stiff/workspace/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run' /Users/stiff/workspace/rails/activesupport/lib/active_support/callbacks.rb:408:in `_run_setup_callbacks' /Users/stiff/workspace/rails/activesupport/lib/active_support/callbacks.rb:81:in `send' /Users/stiff/workspace/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/stiff/workspace/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:65:in `run' --------------- 107 tests, 310 assertions, 1 failures, 0 errors
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>