Giter Site home page Giter Site logo

Pagination Sort about cakephp-3-oracle HOT 5 OPEN

snelg avatar snelg commented on July 28, 2024
Pagination Sort

from cakephp-3-oracle.

Comments (5)

snelg avatar snelg commented on July 28, 2024

Opening another issue is fine. I prefer that to having a single issue expand and evolve over time.
I can't re-create the problem. Sorting + Pagination is working as expected on my little test system. So it's not broken at the very basic level.
There could very easily still be something missing in my code, though. Some condition I didn't consider. If you can't figure out where the problem is, you can send me code examples (whatever you think is pertinent) and I'll see if I can figure it out.

from cakephp-3-oracle.

mklappen avatar mklappen commented on July 28, 2024

hmm, thanks. Not sure on this, does your pagination example you tested contain any relationship/foreign key?
My table has a belongsTo/hasMany relationship so it's pulling a foreign key from another table/model.
So there's an INNER JOIN in the generated SQL both when page loads and when I click on a column to sort. Just that after clicking on column header to sort the ORDER BY not added into the SQL.

That's only thing I can think of now, but I honestly havent had a lot of time to look into it today. Will try to debug more and let you know, but may be a week before as I'm out of town next week.

Thanks!

from cakephp-3-oracle.

snelg avatar snelg commented on July 28, 2024

Ah, no I didn't test with relationships. I'll try that in a bit, but maybe you missed the "sortWhitelist" pagination thing:
http://book.cakephp.org/3.0/en/controllers/components/pagination.html#control-which-fields-used-for-ordering
Important quote on that page: "This option is required when you want to sort on any associated data"

from cakephp-3-oracle.

snelg avatar snelg commented on July 28, 2024

Yep, pretty sure that's your problem. Sorting on related table data works properly for me, but only when using the sortWhitelist as described in that link.

from cakephp-3-oracle.

mklappen avatar mklappen commented on July 28, 2024

ah, yes you may be right... i don't think I did add sortWhitelist. away from computer now but will double check and post back when have access to my code. thanks again

from cakephp-3-oracle.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.