entity.py
branchstable
changeset 7899 4f6ff757f83c
parent 7552 82dde8276a5b
child 7907 08320697ca1a
child 7911 5ab88d05083f
equal deleted inserted replaced
7898:405017c79b45 7899:4f6ff757f83c
   775             if ' ORDERBY ' in rql:
   775             if ' ORDERBY ' in rql:
   776                 rql = '%s WHERE %s' % (rql.split(' ORDERBY ', 1)[0],
   776                 rql = '%s WHERE %s' % (rql.split(' ORDERBY ', 1)[0],
   777                                        rql.split(' WHERE ', 1)[1])
   777                                        rql.split(' WHERE ', 1)[1])
   778         elif not ' ORDERBY ' in rql:
   778         elif not ' ORDERBY ' in rql:
   779             args = rql.split(' WHERE ', 1)
   779             args = rql.split(' WHERE ', 1)
   780             # if modification_date already retreived, we should use it instead
   780             # if modification_date already retrieved, we should use it instead
   781             # of adding another variable for sort. This should be be problematic
   781             # of adding another variable for sort. This should be be problematic
   782             # but it's actually with sqlserver, see ticket #694445
   782             # but it's actually with sqlserver, see ticket #694445
   783             if 'X modification_date ' in args[1]:
   783             if 'X modification_date ' in args[1]:
   784                 var = args[1].split('X modification_date ', 1)[1].split(',', 1)[0]
   784                 var = args[1].split('X modification_date ', 1)[1].split(',', 1)[0]
   785                 args.insert(1, var.strip())
   785                 args.insert(1, var.strip())