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
specify this.
Of course it would be easy to hardwire the logic into a method, but i
would like to use the normal relation wiring …
Dirk
> create table what (
> myclass int, ;; references blahclass.blahid
> …
…
> I would like to wrap this as
> class What < AR::Base
> has_one :blahclass
It’s in the other direction (a common error):
class What < AR::Base
belongs_to :blahclass …
…
When you read ‘belongs_to’, think ‘references’, ‘points_to’.