search for: mcolumn

Displaying 5 results from an estimated 5 matches for "mcolumn".

Did you mean: column
2006 Feb 06
3
linked table confusion
...clients has_many :placements I am trying to create a view file for placements. 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...
2006 Mar 01
2
active_record postgresql adapter problem
...ated the field "unit_price" as PostgreSQL type money. Now when I try and add a row I get the following. How do I override AR default behaviour to cast numeric post data to money, or am I forced to only support database types that active_record knows about? RuntimeError: ERROR C42804 Mcolumn "unit_price" is of type money but expression is of type numeric HYou will need to rewrite or cast the expression. Fparse_target.c L361 RupdateTargetListEntry: INSERT INTO line_items ("order_id", "product_id", "quantity", "unit_price") VALUES(1,...
2006 Feb 03
9
Because I''m very slow - trying to use console
...to use variables so I am using console to test things out... clients table - a column named first_name My very brief console session... >> clients = Client.find_by_sql("select * from clients where first_name = FN") ActiveRecord::StatementInvalid: RuntimeError: ERROR C42703 Mcolumn "fn" does not exist Fparse_expr.c L1034 RtransformColumnRef: select * from clients where first_name = FN from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract_adapter.rb:88:in `log'' and a few lines of application trace remov...
2006 Nov 04
0
one to many relationship; has_one
...and a location model using rails scripts and then edited the models 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 l...
2006 Jul 31
2
ambiguous column name in has_many :through
...tiveRecord::Base belongs_to :project end When I attempt to grab an account''s items through @my_account.items everything is fine. However, when I try to find the late items with @my_account.late_items I get a RuntimeError: ActiveRecord::StatementInvalid: RuntimeError: ERROR C42702 Mcolumn reference "closed_at" is ambiguous Fparse_relation.c L360 RscanRTEForColumn: SELECT items.* FROM items INNER JOIN projects ON items.project_id = projects.id WHERE (projects.account_id = NULL AND (closed_at IS NULL AND due_on < ''2006-07-31 13:40:17''))...