Comments (6)
没有这个问题, model 中的 year 不会与 $filter 中的函数 year 冲突.
如以下代码是可以正常工作的:
//第一个 year 是函数, 括号中的 year 是 model.
http://host/odata/resource?$filter=year(year) eq 2015
from node-odata.
这样写是没有错,但是下面这样写报错:
$filter=year eq 2015
from node-odata.
Error: gte() must be used after where() when called with these arguments
at Query._ensurePath (/Users/lizheng/Seafile/DA/node_modules/node-odata/node_modules/mongoose/node_modules/mquery/lib/mquery.js:2373:11)
at Query.(anonymous function) [as gte] (/Users/lizheng/Seafile/DA/node_modules/node-odata/node_modules/mongoose/node_modules/mquery/lib/mquery.js:511:12)
at Object.module.exports.year (/Users/lizheng/Seafile/DA/node_modules/node-odata/lib/request/handle/get/query-functions/index.coffee:21:39)
at module.exports (/Users/lizheng/Seafile/DA/node_modules/node-odata/lib/request/handle/get/query-parser/$filter.coffee:44:7)
at Object.module.exports.getAll [as controller] (/Users/lizheng/Seafile/DA/node_modules/node-odata/lib/request/handle/get/index.coffee:16:5)
at /Users/lizheng/Seafile/DA/node_modules/node-odata/lib/resource.coffee:58:21
from node-odata.
@airyland 确实是这样的, 感谢你的反馈, 我将尽快修复这个问题.
from node-odata.
@airyland 已修复这个问题, 请使用 npm update node-odata
更新到新版本.
from node-odata.
Thx
from node-odata.
Related Issues (20)
- Accept header
- Service document
- $select query option by get by id
- Deep objects and dot as property name
- How to use this with existing express instance? HOT 1
- Async Auth support HOT 1
- Skipping saving to db inside the post/put().before HOT 7
- asynchronous calls inside the post/put().before HOT 2
- A better way to declare a resource. HOT 3
- How do i get _id property? HOT 1
- Can I host on SSL? HOT 1
- Generate service according edmx/metadata HOT 1
- JSON Patch support for partial updates on resource HOT 1
- Parenthesis are not supported in filter HOT 1
- Please show example with mongodb and how it is accessed/ queried
- Critical and high vulnerability from npm audit
- Metadata Endpoint
- Node version corresponding package-lock.json
- some tests fails each run, but each time different test
- $format query option
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 node-odata.