Skip to content
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

Error creating new record after adding type 'array' in schema #66

Closed
SharpBCD opened this issue Oct 4, 2019 · 1 comment
Closed

Error creating new record after adding type 'array' in schema #66

SharpBCD opened this issue Oct 4, 2019 · 1 comment

Comments

@SharpBCD
Copy link

SharpBCD commented Oct 4, 2019

After adding:

properties: {
	an_array: {type: 'array'} 
}```
I can no longer create new records from front-end client with regular: `create({an_array:["something"]})`.
The error is: `malformed array literal: "["something"]"`

It works when I delete the definition from model.js but then I can't search for `$contains`.
@SharpBCD SharpBCD changed the title Error in creating after adding type 'array' in schema Error creating new record after adding type 'array' in schema Oct 4, 2019
@dekelev
Copy link
Member

dekelev commented Oct 11, 2019

v4.4.2 should fix this issue.

model - define the property as array type
create record - property accepts a deserialized array as value
contains search - $contains accepts deserialized or serialized array of values to search for

@dekelev dekelev closed this as completed Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants