leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

Default ordering/sorting when no one defined ? #276

Closed zedtux closed 6 years ago

zedtux commented 8 years ago

I was looking at the default sorting / ordering when coming to the first page when no one has been defined in a controller, but I don't find any issues regarding this point.

I'm worrying about this since I see the failing tests on Travis-CI with MySQL, while there are passing on my machine with MySQL too. The difference I could see, explaining this issue, is that the MySQL version from Travis-CI is 5.6 as stated in the Build Environment Update History page and on my machine I have the 5.7 and this would change the way the records are returned by the DB without an ordering. (Plus, with PostgreSQL, an absolutely different order of records will be returned for sure).

In case no default ordering has been defined when no one is given, I would suggest to go for an ordering by ID ascending.

leikind commented 8 years ago

I agree. Even if your guess is incorrect as to why tests on CI do not pass, this should be done.

zedtux commented 8 years ago

... your guess is incorrect as to why tests on CI do not pass

Why ? Explain ?

leikind commented 8 years ago

I am saying that this default ordering is good anyway

zedtux commented 8 years ago

Are you saying that it's good to have an ordering from the database, knowing it's changing depending the OS, the DB, DB version and so on, or do I understand you wrong ?

leikind commented 8 years ago

No. I support your opinion

I would suggest to go for an ordering by ID ascending.

zedtux commented 8 years ago

Okay, then misunderstanding from my side :) Sorry.

Let's give it a try ;)

BTW what's your feeling about developing with Docker ?

zedtux commented 6 years ago

Let's close this issue and if someone needs it, you could re-open it.