search for: relationship_typ

Displaying 3 results from an estimated 3 matches for "relationship_typ".

Did you mean: relationship_type
2006 Apr 17
0
Pros/cons of doubling up in Self-Referential has_many via :through
...B, then person B has a relationship (of type i) with person A. In Rails Recipes (and in my original HABTM setup), this was done by automatically adding a reverse row to the relationships table using :after_add (and removing it with :after_remove). Downside is that if the table has attributes (relationship_type, notes on relationship) this starts to get a bit messy, meaning that every time one is updated the reverse must be too. I could wrap this up in a transaction, but somehow it seems a bit inelegant. The other way -- which is how I''ve done it -- is to leave the relationship with a singl...
2006 Mar 13
2
HowToHandleMultipleRelationshipsBetweenTables?
I have two tables where one of the tables contains two columns that reference the id of the other. This problem is partially described in the "HowTo..." with the topic title above. My model looks like this: class Relationship < ActiveRecord::Base belongs_to :relationshiptype, :foreign_key => "relnshiptype" belongs_to :relationshiptype, :foreign_key =>
2005 Aug 25
1
newbie questions about hosting address
...''m having an issue where code that works in a single threaded model is throwing a wierd exception when I spawn my own thread. Here is the code in question: relationship = Relationship.new(:src_entity => @entity, :created_by => @entity.created_by, :target_entity => target_entity, :relationship_type => rel_type) And the error that is thrown is this: /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/associations/association_proxy.rb:93:in `raise_on_type_mismatch'': Entity expected, got Entity (ActiveRecord::AssociationTypeMismatch) from /usr/lib/ruby/gems/1.8/gems/...