[CDBI] Two has_a Relationships to the Same Table?

Dave Mabe davemabe at gmail.com
Wed Apr 23 14:05:58 BST 2008


I've got one table (A) with a has_a relationship to another table (B).  I'd
like to add another column to table A that is the foreign key for a record
in table B.

I tried to simply add the column and then put another has_a relationship in
the class for table A, but I get "Column does not exist" errors.  I tried
adding the new column name as a TEMP column in the class for table B and
also adding it as a table_alias for table B both of which give the same
error.

Any idea how to do this?  Is it possible to set up another class for table B
for the second relationship (still pointing to the data in the same table)?

TIA

-- 
Dave Mabe
StockTickr - Trader Performance Analysis
We Make Traders More Profitable
http://www.stocktickr.com/

Every trade I make is blogged:
http://blog.stocktickr.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digitalcraftsmen.net/pipermail/classdbi/attachments/20080423/75c1133f/attachment.htm 


More information about the ClassDBI mailing list