| Module | Sequel::Plugins::PreparedStatementsAssociations::ClassMethods |
| In: |
lib/sequel/plugins/prepared_statements_associations.rb
|
Disable prepared statement use if a block is given, or the :dataset or :conditions options are used, or you are cloning an association.
# File lib/sequel/plugins/prepared_statements_associations.rb, line 28
28: def associate(type, name, opts = {}, &block)
29: if block || opts[:dataset] || opts[:conditions] || (opts[:clone] && association_reflection(opts[:clone])[:prepared_statement] == false)
30: opts = opts.merge(:prepared_statement=>false)
31: end
32: super(type, name, opts, &block)
33: end