help: association "sticks" in production mode

I have this self-referencial association that performs fine in dev mode, but gets "stuck" in production mode. To be more specific, the association is recalled from the first time an instance of the model is loaded. Here is the association's declaration:

has_and_belongs_to_many :compeers,       :class_name => "Expression",       :join_table => "expressions_compeers",       :foreign_key => "id_a",       :association_foreign_key => "id_b",       :finder_sql => 'SELECT e.* FROM expressions e, expressions_compeers c WHERE ( = c.id_a AND c.id_b = #{id}) OR ( = c.id_b AND c.id_a = #{id})',       :delete_sql => 'DELETE FROM expressions_compeers WHERE (id_a = #{id} AND id_b = #{}) OR (id_a = #{} AND id_b = #{id})'

What's different between the modes that could cause this discrepancy? Does anybody have an idea?

Thanks -Sebastian


You were right: the declaration was double-backed! Everything works fine after removing the :finder_sql and :delete_sql conditions. Thanks a lot! What threw me off was that it worked fine in dev mode...