Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 79773
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: moseley [...] hank.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.08204



Subject: Ordered component _shift_siblings fails with Postgresql
Download (untitled) / with headers
text/plain 720b
The single query used in _shift_siblings can fail in Postgresql because UNIQUE constraints are checked during the single query and the order of moving is not guaranteed. If the UNIQUE( position, group ) is deferred then it will work, but we are running 8.4.5 which doesn't support that. See: http://www.depesz.com/2009/08/11/waiting-for-8-5-deferrable-uniqueness/ The old approach (where each row was moved in a separate query) works, of course, but it's less ideal than a single query. Perhaps the approach can be configurable? I'm simply overriding the Ordered component so it's not difficult to revert to the old code in my case. See also list discussion: DBIx::Class::Ordered changes. on Sept 18, 2012.
Download (untitled) / with headers
text/plain 123b
I guess I'm experiencing the same problem with sqlite. I created a test case: https://github.com/davewood/dbic-ordered-bug
Download (untitled) / with headers
text/plain 164b
Right, with extra testing it seems that the entire idea was rather shortsighted. c3f4bbec9 reverts to the original logic and adds a test to show the prolem clearly.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.