[CDBI] Two has_a Relationships to the Same Table?

Mertel, Mark mm330g at att.com
Wed Apr 23 14:13:14 BST 2008


Did you use the mappings method? How about including your code snippet.

 

---

Mark Mertel

TEK systems

Desk: 425.288.7214

Mobile: 206.353.2663

 

________________________________

From: classdbi-bounces at svr02.digitalcraftsmen.net
[mailto:classdbi-bounces at svr02.digitalcraftsmen.net] On Behalf Of Dave
Mabe
Sent: Wednesday, April 23, 2008 6:06 AM
To: ClassDBI at svr02.digitalcraftsmen.net
Subject: [CDBI] Two has_a Relationships to the Same Table?

 

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/0f92a8b0/attachment.htm 


More information about the ClassDBI mailing list