Displaying 2 results from an estimated 2 matches for "table1_1".
2012 Aug 26
3
Two selections from Bag A
All, I am looking at an example in Aliaga's Interactive Statistics. Bag A has
the following vouchers.
BagA <- c(-1000,10,10,10,10,10,10,
10,20,20,20,20,20,20,30,
30,40,40,50,60)
Bag B has the following vouchers.
BagB <- c(10,20,30,30,40,40,50,50,
50,50,50,50,60,60,60,60,
60,60,60,1000)
Two values are selected (from BagA or BagB) without
2005 Dec 19
0
has_one mapping with arbitrary right and left hand side keys
...I am half way there with:
class Table1 < ActiveRecord::Base
set_table_name "table_1"
set_primary_key "tab1_id"
has_one :Table2, :class_name => "Table2", :foreign_key => "tab2_id"
end
However, as you can see, this will join on table_2.tab2_id =
table1_1.tab1_id and not on table_1.other_id.
Is there a notation that I am missing to express this, or is there
another way of acheiving this. I cannot alter the DB schema.
Thanks in anticipation.
--
Posted via http://www.ruby-forum.com/.