In the delete branch of SourceController.index_project, which is invoked when deleting a project, if the code enters the force branch, a MySQL InvalidStatement occurs on the last line of the following block: SourceController < ApplicationController ... def index_project ... pro = DbProject.find_by_name project_name ... #find linking repos lreps = Array.new pro.repositories.each do |repo| repo.linking_repositories.each do |lrep| lreps << lrep end end if lreps.length > 0 if params[:force] and not params[:force].empty? #replace links to this projects with links to the "deleted" project del_repo = DbProject.find_by_name("deleted").repositories[0] lreps.each do |link_rep| pe = link_rep.path_elements.find(:first, :include => ["link"], :conditions => ["db_project_id = ?", pro.id]) The error is ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'db_project_id' in 'where clause': SELECT * FROM `path_elements` WHERE (`path_elements`.parent_id = 2756 AND (db_project_id = 1871)) ORDER BY position LIMIT 1) db_project_id is a not a column in path_elements, so somehow a JOIN is not being generated by the ActiveRecord base class for PathElements. Does anyone know how to fix it so the generated MySQL correctly JOINs in the tables that have db_project_id? -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org