Displaying 2 results from an estimated 2 matches for "display_head".
Did you mean:
display_help
2006 Jan 03
0
habtm and insert_sql
...rd::Base
[...]
has_and_belongs_to_many :child_documents, :class_name => "Document",
:join_table => "topic_subtopic",
:foreign_key => "topic_key", :association_foreign_key =>
"child_topic_key",
:finder_sql => ''select t.*, ts.display_header from topics t,
topic_subtopic ts where t.id = ts.child_topic_key and ts.topic_key =
#{id} and url is not null''
The structure of topic_subtopic, as you can partially deduce from the
above, is:
Column | Type | Modifiers
-----------------+---------...
2006 Mar 29
0
active record bug?
...: insert or update on
table "topic_subtopic" violates foreign key constraint
"fk_topic_subtopic_subtopic_1"
DETAIL: Key (child_topic_key)=(3126) is not present in table "topics".
: INSERT INTO topic_subtopic ("child_topic_key", "topic_key",
"display_header") VALUES(3126, 2, ''Medications'')
The constraint on topic_subtopic is:
ALTER TABLE ONLY topic_subtopic
ADD CONSTRAINT fk_topic_subtopic_subtopic_1 FOREIGN KEY
(child_topic_key) REFERENCES topics(id) ON UPDATE NO ACTION ON DELETE NO
ACTION;
We already know there is an...