Me again. I have a class with a has_many relationship to another
table/model. I wrote some SQL to select the appropriate rows and it
works fin SQL Developer when I substitute IDs for the parent model,
but in the model itself it returns nothing.
I found one blurb online that said you must use single-quote strings
so the string does not interpolate too early, I did that, but it still
finds nothing. Some things are "X"'d out to protect the innocent.
has_many :error_logs, :finder_sql =>
'select error_logs.* from error_logs, error_types ' +
'where error_types.parent_table = \'XXXXXXXXXXX\' ' +
'and error_types.id = error_logs.error_type_id ' +
'and error_logs.parent_table_row_id = #{id}'
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.