Comments (4)
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.
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.
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.
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)
- Disambiguate single-item lists from parenthesized expressions.
- Fully type annotate the library HOT 2
- Better support for `ENUM`s HOT 1
- Question about usage. HOT 2
- Outdated docs HOT 2
- Managing more than one entity in `AstToSqlAlchemyClauseVisitor` HOT 3
- Filter not working for uuid column HOT 6
- Remove Athena specific code HOT 3
- Support for SQLAlchemy Core HOT 2
- Support relationship traversal and `any/all` in SQLAlchemy Core
- Implicit Support for SQLAlchemy's Query-API has been removed HOT 5
- Filter on joined relationship not working for legacy Query objects HOT 3
- apply aggregation support HOT 2
- Definition of sqlalchemy functions_ext overrides desired behaviour HOT 2
- Question about integration HOT 1
- `AstToSqlVisitor` can not handle a function call as right hand side of contains-filter HOT 2
- odata geospatial properties HOT 3
- Missing release tags HOT 1
- Integer values are not parsed correctly HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odata-query.