Displaying 2 results from an estimated 2 matches for "req_reqno".
2009 Apr 16
0
Magic multi connections with association problem
...odule name (i.e.
A::Request, B::Request) in activerecord association.
Below is my code:
module A
establish_connection :A
end
module B
establish_connection :B
end
# and many module....
class Request < ActiveRecord::Base
set_table_name "request"
set_primary_key "req_reqno"
has_many :testrslt, :class_name => "Testrslt", :foreign_key =>
"testrslt_reqno"
end
class Testrslt < ActiveRecord::Base
set_table_name "testrslt"
belongs_to :request, :class_name => "Request", :foreign_key =>
"testrslt_r...
2009 Mar 17
11
Refactoring module
...nly?
true
end
end
class RemoteSX4Model < ActiveRecord::Base
def readonly?
true
end
end
class RemoteSX5Model < ActiveRecord::Base
def readonly?
true
end
end
module SX3
class Request < RemoteSX3Model
set_table_name "request"
set_primary_key "req_reqno"
has_many :print_audit, :class_name => "PrintAudit", :foreign_key =>
"prtaud_reqno"
has_many :request_copy_hist, :class_name => "RequestCopyHist",
:foreign_key => "reqcp_reqno"
belongs_to :patient, :class_name => "SX9::Pat...