我正在使用loopback生成REST API并且有一个考勤表,其中包含学生的出勤记录 . 以下查询给出了下面给出的结果 .
http:// localhost:3000 / api / attendances?filter [where] [date] = 2015-08-27T05:26:33.000Z
Result:
[
{
"regno": "1414",
"name": "Salman",
"reason": "on leave",
"class": "R",
"date": "2015-08-27T05:26:33.000Z",
"status": true,
"id": 1
}
]
但我希望通过这样的查询获得相同的结果
http:// localhost:3000 / api / attendances?filter [where] [date] = 2015-08-27
时间不应该是必要的......或者认为它是一个未知的实体 . 我怎样才能得到与上面相同的结果?
1 回答
目前环回不支持类似的东西 . 随意打开一个问题,但这适用于postgresql:
您也可以覆盖find方法来为您执行此操作 .