lib/rom/sql/relation.rb in rom-sql-2.0.0.beta2 vs lib/rom/sql/relation.rb in rom-sql-2.0.0.beta3
- old
+ new
@@ -4,11 +4,10 @@
require 'rom/sql/wrap'
require 'rom/sql/transaction'
require 'rom/sql/relation/reading'
require 'rom/sql/relation/writing'
-require 'rom/sql/relation/sequel_api'
module ROM
module SQL
# Sequel-specific relation extensions
#
@@ -47,9 +46,11 @@
event[:relation].define_default_views!
end
# @api private
def self.define_default_views!
+ undef_method :by_pk if method_defined?(:by_pk)
+
if schema.primary_key.size > 1
# @!method by_pk(val1, val2)
# Return a relation restricted by its composite primary key
#
# @param [Array] args A list with composite pk values