appy-one / acebase

A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
MIT License
491 stars 27 forks source link

Schema validation fails for updates on higher path #217

Closed appy-one closed 1 year ago

appy-one commented 1 year ago

I have a schema set on path "users/$uid/library" with (partial):

{
  books: { 
    $id: {
      author: 'string',
      title: 'string',
    }
  },
  cds: {
    $id: {
      title: 'string',
      artist: 'string',
    }
  }
}

When running the following code:

await db.ref('users/someuser').update({ test: "Test" })`;

I get error:

{
    "code": "schema_validation_failed",
    "message": "Schema validation failed: path \"users/[someuserid]/library\" must be an object collection"
}
appy-one commented 1 year ago

Fix published in v1.28.2

Sponsor AceBase Spread the word contribute