dobo 1.1.16 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Database ORM/ODM for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -16,6 +16,7 @@ async function findOne (name, filter = {}, opts = {}) {
16
16
  options.dataOnly = false
17
17
  await this.modelExists(name, true)
18
18
  filter.limit = 1
19
+ filter.page = 1
19
20
  const { handler, schema, driver } = await resolveMethod.call(this, name, 'record-find', options)
20
21
  if (!schema.cacheable) noCache = true
21
22
  filter.query = await this.buildQuery({ filter, schema, options }) ?? {}
@@ -34,6 +35,7 @@ async function findOne (name, filter = {}, opts = {}) {
34
35
  }
35
36
  }
36
37
  filter.limit = 1
38
+ filter.page = 1
37
39
  const record = options.record ?? (await handler.call(this.app[driver.ns], { schema, filter, options }))
38
40
  delete options.record
39
41
  record.data = record.data[0]