dobo 2.6.3 → 2.6.5

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.
@@ -26,7 +26,7 @@ async function collectDrivers () {
26
26
  const instance = new Cls(this, name)
27
27
  if (!(instance instanceof DoboDriver)) this.fatal('invalidDriverClass%s%s', this.ns, name)
28
28
  me.drivers.push(instance)
29
- me.log.trace('- %s', name)
29
+ me.log.trace('- %s:%s', this.ns, name)
30
30
  }, { glob: 'driver/*.js', prefix: this.ns })
31
31
  await runHook(`${this.ns}:afterCollectDrivers`)
32
32
  this.log.debug('collected%s%d', this.t('driver'), this.drivers.length)
@@ -255,7 +255,7 @@ async function createSchema (item) {
255
255
  if (item.base) {
256
256
  for (const ns of this.app.getAllNs()) {
257
257
  const plugin = this.app[ns]
258
- const glob = `${plugin.dir.pkg}/extend/dobo/extend/${item.ns}/item/${item.base}.*`
258
+ const glob = `${plugin.dir.pkg}/extend/dobo/extend/${item.ns}/model/${item.base}.*`
259
259
  const files = await fastGlob(glob)
260
260
  for (const file of files) {
261
261
  const extender = await readConfig(file, { ns: plugin.ns, ignoreError: true })
@@ -258,7 +258,9 @@ async function driverFactory () {
258
258
  }
259
259
 
260
260
  async _updateRecord (model, id, body = {}, options = {}) {
261
- if (!this.support.uniqueIndex) await this._checkUnique(model, body, options)
261
+ if (!options.noUniqueCheck) {
262
+ if (!this.support.uniqueIndex) await this._checkUnique(model, body, options)
263
+ }
262
264
  if (!options._data) {
263
265
  const resp = await this.getRecord(model, id, { noHook: true })
264
266
  if (!resp.data) throw this.plugin.error('recordNotFound%s%s', id, model.name)
@@ -274,7 +276,9 @@ async function driverFactory () {
274
276
  }
275
277
 
276
278
  async _upsertRecord (model, body = {}, options = {}) {
277
- if (!this.uniqueIndexSupport) await this._checkUnique(model, body, options)
279
+ if (!options.noUniqueCheck) {
280
+ if (!this.uniqueIndexSupport) await this._checkUnique(model, body, options)
281
+ }
278
282
  if (isSet(body.id)) {
279
283
  if (!options._data) {
280
284
  const resp = await this.getRecord(model, body.id, { noHook: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "2.6.3",
3
+ "version": "2.6.5",
4
4
  "description": "DBMS for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-02-17
4
+
5
+ - [2.6.5] Bug fix on model extender
6
+ - [2.6.5] Bug fix on trace logging
7
+
8
+ ## 2026-02-05
9
+
10
+ - [2.6.4] Bug fix on driver options, ```noCheckUnique``` must be perform in ```create```, ```update``` and ```upsert```
11
+
3
12
  ## 2026-02-03
4
13
 
5
14
  - [2.6.3] Bug fix on ```model.sanitizeRecord()```