Bug #6786

Persistence Query Orderings integers ordered like strings

Added by Georg Ortner almost 11 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Must have
Category:
Persistence
Start date:
2010-03-16
Due date:
% Done:

100%

Estimated time:
2.00 h
PHP Version:
Has patch:
Complexity:

Description

Code (property order is declared as INT):

$query->matching( $query->equals('parentUUID', ''))
    ->setOrderings(array('order' => \F3\FLOW3\Persistence\QueryInterface::ORDER_ASCENDING))

The result is:

1
10
12
17
2
29
3

If order was a string this would be fine but for an integer everyone would expect:

1
2
3
10
12
17
29

#1

Updated by Karsten Dambekalns almost 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Target version deleted (1.0 alpha 8)
  • Estimated time set to 4.00 h
#2

Updated by Karsten Dambekalns almost 11 years ago

  • Target version set to 1.0 alpha 8
  • Start date changed from 2010-03-11 to 2010-03-16
  • Estimated time changed from 4.00 h to 2.00 h
#3

Updated by Karsten Dambekalns almost 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3966.

Also available in: Atom PDF