- Home
- Technical Library
- Partners
- Blog
- Ideas
- Code Share
-
Discussion Boards
- Announcements
- General Development
- New to Cloud
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules Discussion
- Security
- Force.com Sites
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby Development
- Adobe Flash Builder for Force.com
- Desktop Integration
- Apple, Mac and OS X
- VB and Office Development
- Excel Connector
- AJAX Toolkit & S-controls
- Force.com Builder & Native Apps
- AppExchange Directory & Packaging
- Force.com Labs Projects
- Open Source
- Jobs Board - Developer
- Job Board - Administrators
- More
Discussions
- Announcements
- General Development
- New to Cloud Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules Discussion
- Security
- Force.com Sites
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby Development
- Adobe Flash Builder for Force.com
- Desktop Integration
- Apple, Mac and OS X
- VB and Office Development
- Excel Connector
- AJAX Toolkit & S-controls
- Force.com Builder & Native Apps
- AppExchange Directory & Packaging
- Force.com Labs Projects
- Open Source
- Jobs Board - Developers
- Jobs Board - Administrators
- Force.com Discussion Boards
- :
- Developer Boards
- :
- Perl, PHP, Python & Ruby Development
- :
- Error using ActiveSalesForce - The :dependent opti...
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Error using ActiveSale sForce - The :dependent option expects either :destroy or :delete (:nullify)
[ Edited ]
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-02-2008 05:10 PM - last edited on 07-02-2008 05:10 PM
I am currently running Rails 2.1 and have run into a problem. The first time I try to run a command such as find against Salesforce I get this error (the second query works fine):
"The :dependent option expects either :destroy or :delete (:nullify)"
The stack trace looks like this:
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib /active_record/associations.rb:1332:in `configure_dependency_for_belongs_to'
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib /active_record/associations.rb:940:in `belongs_to'
/Library/Ruby/Gems/1.8/gems/activerecord-activesal esforce-adapter-2.0.0/lib/active_record/connection _adapters/activesalesforce_adapter.rb:705:in `configure_active_record'
/Library/Ruby/Gems/1.8/gems/activerecord-activesal esforce-adapter-2.0.0/lib/active_record/connection _adapters/activesalesforce_adapter.rb:672:in `each'
/Library/Ruby/Gems/1.8/gems/activerecord-activesal esforce-adapter-2.0.0/lib/active_record/connection _adapters/activesalesforce_adapter.rb:672:in `configure_active_record'
/Library/Ruby/Gems/1.8/gems/activerecord-activesal esforce-adapter-2.0.0/lib/active_record/connection _adapters/activesalesforce_adapter.rb:649:in `get_entity_def'
/Library/Ruby/Gems/1.8/gems/activerecord-activesal esforce-adapter-2.0.0/lib/active_record/connection _adapters/activesalesforce_adapter.rb:764:in `lookup'
/Library/Ruby/Gems/1.8/gems/activerecord-activesal esforce-adapter-2.0.0/lib/active_record/connection _adapters/activesalesforce_adapter.rb:268:in `select_all'
I have tracked the error to line 705 in activesalesforce_adapter.rb:
klass.belongs_to referenceName.to_sym, :class_name => referenced_klass.name, :foreign_key => foreign_key, :dependent => :nullify
If I remove ':dependent => :nullify' then everything works fine.
For reference this is my model:
class Contact < ActiveRecord::Base
establish_connection :salesforce_production
end
:salesforce_production refers to my connection parameters in database.yml.
and here is the call I am making:
sf_user = Contact.find(:first,:conditions => {:email => self.email} ) || Contact.new()
Is this a bug or have I misconfigured something?
Thanks,
Justin
Message Edited by jbasdf on 07-02-2008 05:10 PM
"The :dependent option expects either :destroy or :delete (:nullify)"
The stack trace looks like this:
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib
/Library/Ruby/Gems/1.8/gems/activerecord-activesal
/Library/Ruby/Gems/1.8/gems/activerecord-activesal
/Library/Ruby/Gems/1.8/gems/activerecord-activesal
/Library/Ruby/Gems/1.8/gems/activerecord-activesal
/Library/Ruby/Gems/1.8/gems/activerecord-activesal
/Library/Ruby/Gems/1.8/gems/activerecord-activesal
I have tracked the error to line 705 in activesalesforce_adapter.rb:
klass.belongs_to referenceName.to_sym, :class_name => referenced_klass.name, :foreign_key => foreign_key, :dependent => :nullify
If I remove ':dependent => :nullify' then everything works fine.
For reference this is my model:
class Contact < ActiveRecord::Base
establish_connection :salesforce_production
end
:salesforce_production refers to my connection parameters in database.yml.
and here is the call I am making:
sf_user = Contact.find(:first,:conditions => {:email => self.email} ) || Contact.new()
Is this a bug or have I misconfigured something?
Thanks,
Justin
Message Edited by jbasdf on 07-02-2008 05:10 PM
Message 1 of 2
(25,880 Views)
Re:Error using ActiveSale sForce The :dependent option expects either :destroy or :delete (:nullify)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-08-2008 04:35 PM
I found this post on Ruby Forge that indicates that there is a bug:
http://rubyforge.org/tracker/index.php?func=detail &aid=19960&group_id=1201&atid=4729
There is a patch attached so for now I can just unpack the gem. Is there anytime frame for this to be fixed? Is this project still in active development?
http://rubyforge.org/tracker/index.php?func=detail
There is a patch attached so for now I can just unpack the gem. Is there anytime frame for this to be fixed? Is this project still in active development?
Message 2 of 2
(25,728 Views)

