Giter Club home page Giter Club logo

Comments (5)

weiznich avatar weiznich commented on June 15, 2024 1

Thanks for providing the minimal example. That's helpful. I will try to have a look at that in the next days/weeks.

from diesel.

weiznich avatar weiznich commented on June 15, 2024 1

I can confirm this issue. This also affects queries like users::table.order_by(persons::age).select(persons::age). These queries are not allowed without additional group by clause by postgresql and should be rejected at compile time by diesel. That likely means that we need to restrict the order clause values in a similar way than we already do for select clauses. I personally would consider that a bug fix even if this breaks code that would compile now (especially as the generated queries are broken).
To workaround this kind of issue on current diesel releases you need to not write queries that mix non-aggregate and aggregate clauses in this way. So either add a group_by clause or remove the order clause.

from diesel.

weiznich avatar weiznich commented on June 15, 2024

Thanks for filling this bug report. Its always a lot of work to find problems in applications, especially if the it requires several steps and a lot unrelated dependencies. Please try to provide a minimized example that does not required additional dependencies outside of diesel and rust-stdlib, otherwise this issue is not really actionable.

from diesel.

SamTV12345 avatar SamTV12345 commented on June 15, 2024

Thanks for filling this bug report. Its always a lot of work to find problems in applications, especially if the it requires several steps and a lot unrelated dependencies. Please try to provide a minimized example that does not required additional dependencies outside of diesel and rust-stdlib, otherwise this issue is not really actionable.

@weiznich I added a minimal project: https://gitlab.com/samtv12345/diesel-issue3815 . The only dependency it includes is dotenv for having a single DATABASE_URL

from diesel.

SamTV12345 avatar SamTV12345 commented on June 15, 2024

Thanks for the help <3. Sorry for misreading the last checkbox. I thought a third party crate would be related to diesel, not in general.

from diesel.

Related Issues (20)

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.