search for: mdesc1

Displaying 1 result from an estimated 1 matches for "mdesc1".

Did you mean: desc1
2006 Apr 07
2
has_one not using the pk?
Hello, im trying to wrap a fairly ugly legacy schema using AR. How to handle normalized informations which aren''t connected via the pk? create table what ( myid int, myclass int, ;; references blahclass.blahid mygender int ) create table blahclass ( blahid int, mdesc1 text, fdesc1 text) ) I would like to wrap this as class What < AR::Base has_one :blahclass class Blahclass < AR::Base belongs_to :who The problem is that a lookup of who.blahclass uses the who.pk to get the Blahclass record, but it should use who.blahclass. I dont find a way to spe...