admin icon indicating copy to clipboard operation
admin copied to clipboard

V2 :: Orderable -> moveup() & movedown()

Open macedodebrito opened this issue 10 years ago • 0 comments

Hello again.

i have a wierd situation happening, and cant understand, since im using orderable table in several places and only this one is giving me this wierd "bug":

1

Ok: this is all i need to reproduce the thing.

After i try to "reorder" with the ARROWS, this happen:

2

If we see the log produced by DEBUGBAR:

select gallery_items.* from gallery_items where type = '1' and gallery_items.id = '369' order by position asc limit 1 select gallery_items.* from gallery_items where type = '1' and position = '1' order by position asc limit 1 update gallery_items set position = '0', updated_at = '2015-10-06 17:23:05' where id = '2' update gallery_items set position = '1', updated_at = '2015-10-06 17:23:05' where id = '369'

Well, he is not using the proper ID for the SECOND line, and he is trying to SWITCH with ID=2.

Did anyone had this problem ?

:(

macedodebrito avatar Oct 06 '15 17:10 macedodebrito