[GH-ISSUE #217] Schema validation fails for updates on higher path #99

Closed
opened 2026-05-23 08:30:42 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @appy-one on GitHub (Apr 24, 2023).
Original GitHub issue: https://github.com/appy-one/acebase/issues/217

Originally assigned to: @appy-one on GitHub.

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"
}
Originally created by @appy-one on GitHub (Apr 24, 2023). Original GitHub issue: https://github.com/appy-one/acebase/issues/217 Originally assigned to: @appy-one on GitHub. I have a schema set on path `"users/$uid/library"` with (partial): ```js { books: { $id: { author: 'string', title: 'string', } }, cds: { $id: { title: 'string', artist: 'string', } } } ``` When running the following code: ```js await db.ref('users/someuser').update({ test: "Test" })`; ``` I get error: ```json { "code": "schema_validation_failed", "message": "Schema validation failed: path \"users/[someuserid]/library\" must be an object collection" } ```
gitea-mirror 2026-05-23 08:30:42 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@appy-one commented on GitHub (Apr 24, 2023):

Fix published in v1.28.2

Sponsor AceBase Spread the word contribute

<!-- gh-comment-id:1520871446 --> @appy-one commented on GitHub (Apr 24, 2023): Fix published in [v1.28.2](https://github.com/appy-one/acebase/releases/tag/v1.28.2) [![Sponsor AceBase](https://user-images.githubusercontent.com/26569719/168233053-8e56b243-4140-40ab-9a30-4cb3cc149bfe.svg)](https://github.com/sponsors/appy-one) [![Spread the word](https://user-images.githubusercontent.com/26569719/169265089-3d593555-e1ad-4390-986b-877ac2c38a47.svg)](https://twitter.com/intent/tweet?button=&url=https://github.com/appy-one/acebase&text=I'm+using+@AcebaseRealtime+in+my+project+to+make+my+life+easier!&button=) [![contribute](https://user-images.githubusercontent.com/26569719/169265318-30c4c6a5-7c89-46a0-a7a2-ef433a8192f4.svg)](https://github.com/appy-one/acebase#contributing)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#99
No description provided.