Bugs: Browse | Submit New | Admin

[#3747] Defined connection does not get used in autogenerated Rails relationships

Date:
2006-03-07 21:33
Priority:
4
Submitted By:
(portrman)
Assigned To:
Doug Chasman (dchasman)
Category:
None
State:
Open
Summary:
Defined connection does not get used in autogenerated Rails relationships

Detailed description
ASF automatically creates relationships, but when the relationships is created, the foreign object does not used the
define connection in the parent object to connection to SF.

class SfAccount < ActiveRecord::Base
  establish_connection "sf_development"
end

class SfContact < ActiveRecord::Base
  establish_connection "sf_development"
end

@account = SfAccount.find(someid)
@account.contacts  =>  This does not work

When doing .contacts instead of using sf_development ASF uses the connection in development, going back to the default
connection.

In addition to use the connection defined, a mechanism is needed to ensure that if an SID is passed, that that is used
or at least we can say to use the SID instead of the defined SF connection.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2006-03-10 02:16
Sender: Doug Chasman

I will be working on this one over the weekend
Date: 2006-03-10 02:13
Sender: Doug Chasman

SID auth is already supported using

establish_connection :sid => some_sid

and there is also a filter class
(ActiveSalesforce::SessionIDAuthenticationFilter) that you might
want to use/look at that manages sid auth in your controller
automatically

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
priority32006-03-10 02:16dchasman
assigned_tonone2006-03-10 02:13dchasman