Coder Social home page Coder Social logo

Comments (4)

OliverHofkens avatar OliverHofkens commented on July 18, 2024

Hey, glad you like the library, thanks!

It seems that this is a bug, specifically when using the Django backend. I've tested against both our SQLAlchemy app and Django app, and the Django test does indeed fail. Good catch!

In the case of contains however, the comparison isn't strictly necessary as contains already returns a boolean. So your example should work if you just use contains(category,'danielle hutchens') or contains(email,'danielle hutchens') or ... (without the eq true).

I'm gonna look into this, as your query is also correct and should just work.

from odata-query.

OliverHofkens avatar OliverHofkens commented on July 18, 2024

Hmmm, I though I'd found a solution in db85807. Turns out it relies on new functionality only introduced in Django 4. I'll have to rethink my fix!

from odata-query.

al-the-x avatar al-the-x commented on July 18, 2024

Happy to contribute here. For our use case, Salesforce is the client, so we don't really have control of the query that is constructed. I suppose we could inspect the AST and drop the Eq with a left-hand Call for the Call itself, if that's the issue?

from odata-query.

OliverHofkens avatar OliverHofkens commented on July 18, 2024

Hey @al-the-x ,
sorry to keep you waiting for so long. I felt like I was perpetually within 5 minutes of fixing this, but things kept popping up.
#20 would fix this issue, but includes quite a big change to how Django queries are constructed (in line with new Django 4 features). I wouldn't recommend updating production software blindly, as some issues are present relating to upstream Django issues (e.g. https://code.djangoproject.com/ticket/33705).

Your fix would definitely be a good band-aid if updating is not an option!

from odata-query.

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.