Displaying 2 results from an estimated 2 matches for "runknown_attribut".
Did you mean:
runknown_attribute
2006 Feb 06
3
linked table confusion
...ements.
I can pull columns from clients table in this view by using...
<%= @placement.client.wholename %>
but if I use
<% @placement.case_manager.wholename %>
I get error...
RuntimeError: ERROR C42703 Mcolumn case_managers.placement_id does
not exist Fparse_func.c L1359 Runknown_attribute: SELECT * FROM
case_managers WHERE (case_managers.placement_id = 4) LIMIT 1
which makes sense in that I don''t have a ''placement_id'' column in
case_managers table. But case manager has many placments so I did create
a join table - case_managers_placements in which there...
2006 Nov 04
0
one to many relationship; has_one
...els as follows
class Content < ActiveRecord::Base
has_one :location
end
class Location < ActiveRecord::Base
belongs_to :content
end
When I attempt to access content.location I get this error
|RuntimeError: ERROR C42703 Mcolumn locations.content_id does not exist Fparse_func.c
L1036 Runknown_attribute: SELECT * FROM locations WHERE (locations.content_id = 9) LIMIT 1|
I have been able to work around this by defining the association in the
content class as
has_many :location, :finder_sql => ''SELECT * FROM locations WHERE
locations.id = #{location_id}''
I attempted defini...