lib/active_ldap/associations.rb in activeldap-1.2.0 vs lib/active_ldap/associations.rb in activeldap-1.2.1

- old
+ new

@@ -123,16 +123,16 @@ :primary_key_name => primary_key, :wrap => options[:wrap], :extend => options[:extend], } if opts[:wrap] - opts[:foreign_key_name] ||= "#{association_id}_id" association_class = Association::HasManyWrap else association_class = Association::HasMany primary_key_name = opts[:primary_key_name] foreign_key_name = opts[:foreign_key_name] if primary_key_name != foreign_key_name and + primary_key_name != "dn" and !new.have_attribute?(primary_key_name) message = _(":primary_key and :foreign_key has_many options are " \ "inverted their mean since 1.1.0. Please invert them.") ActiveSupport::Deprecation.warn(message) opts[:foreign_key_name] = primary_key_name