Skip to content

Commit 94eb8e0

Browse files
committed
Support paged_updates with multiple FROM tables
1 parent 8df5d59 commit 94eb8e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sequel/plugins/paged_operations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module Plugins
6060
# # ...
6161
# # SELECT id FROM albums WHERE ((name <= 'M') AND (id >= 12345)) ORDER BY id LIMIT 1 OFFSET 4
6262
# # UPDATE albums SET x = x + 1 WHERE ((name <= 'M') AND (id >= 12345))
63-
#
63+
#
6464
# You should avoid using +paged_update+ or +paged_datasets+
6565
# with updates that modify the primary key, as such usage is
6666
# not supported by this plugin.
@@ -159,7 +159,7 @@ def _paged_operations_pk(meth)
159159

160160
case pk = model.primary_key
161161
when Symbol
162-
Sequel.identifier(pk)
162+
Sequel[model.table_name][pk]
163163
when Array
164164
raise Error, "cannot use #{meth} on a model with a composite primary key"
165165
else

0 commit comments

Comments
 (0)