[CDBI] Two has_a Relationships to the Same Table?

"Dave Mabe" <[email protected]> Wed, 23 Apr 2008 09:05:58 -0400
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
--===============2050682539==
Content-Type: multipart/alternative; 
	boundary="----=_Part_11263_27110750.1208955958946"

------=_Part_11263_27110750.1208955958946
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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/

------=_Part_11263_27110750.1208955958946
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I&#39;ve got one table (A) with a has_a relationship to another table (B).&nbsp; I&#39;d like to add another column to table A that is the foreign key for a record in table B.<br><br>I tried to simply add the column and then put another has_a relationship in the class for table A, but I get &quot;Column does not exist&quot; errors.&nbsp; 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.<br>
<br>Any idea how to do this?&nbsp; Is it possible to set up another class for table B for the second relationship (still pointing to the data in the same table)?<br><br>TIA<br clear="all"><br>-- <br>Dave Mabe<br>StockTickr - Trader Performance Analysis<br>
We Make Traders More Profitable<br><a href="http://www.stocktickr.com/">http://www.stocktickr.com/</a><br><br>Every trade I make is blogged:<br><a href="http://blog.stocktickr.com/">http://blog.stocktickr.com/</a>

------=_Part_11263_27110750.1208955958946--


--===============2050682539==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ClassDBI mailing list
ClassDBI-Ra3b/[email protected]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

--===============2050682539==--