-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexes do not work in objects named "properties" #697
Comments
You have nested EDIT: aah, now I know what you meant to do. But what does the second |
I'm not sure what you mean by "the second But the data would look something like this: {
type: ['h-entry'],
properties: {
name: ['Title']
content: ['Post content']
}
} I simplified the schema to try and just show the part relevant to the bug. But in reality it is much more complex |
Ok this is definitely a bug. A PR would be welcomed. |
@grantcodes thx for pointing this out. I fixed it in the referenced commit. |
Awesome! Thanks for the quick fix @pubkey |
Case
Bug
Issue
Indexes do not work in objects named "properties"
Info
Code
I am storing microformats2 json which defines a property named "properties", if you set an index inside that property RxDB will throw an error with the schema, even though it is totally valid
"SchemaCheck: given index is not defined in schema" is the thrown error.
It definitely is caused by replacements going on here:
rxdb/src/plugins/schema-check.js
Line 241 in 1b44b63
I am not sure what would be required to fix it, you would likely need to check for the nesting of
properties.properties
somehow.The text was updated successfully, but these errors were encountered: