-
Notifications
You must be signed in to change notification settings - Fork 71
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
I can't use push on a schema with an array of objects #79
Comments
I have the exact same issue, the only way I can get this to work is to remove the schema definition, which would not be worth doing. |
I'm hitting this issue-- been 2 years; any resolution? |
Hey,
This project is no longer maintained
Anyway, this looks like expected behavior to me
The reason push fails is that the object you’re pushing does not adhere to
your own schema. It needs to have the shots property
On Wed, 17 Jul 2019 at 07:01, Paul Zirkle ***@***.***> wrote:
I'm hitting this issue-- been 2 years; any resolution?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#79?email_source=notifications&email_token=AAJQTDJB3VAVWJNT7ZHCIYTP72YTJA5CNFSM4DQEAIF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2DECIY#issuecomment-512114979>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJQTDO2TNWRZGHHJ6RCES3P72YTJANCNFSM4DQEAIFQ>
.
--
[image: photo]
*Ivo Georgiev*
Founder & CEO, Stremio
https://www.stremio.com <http://www.stremio.com>
GPG: AC692BE9EB6E024B5C58A8EAC1E94996BC56BACE
<http://www.stremio.com>
<http://www.facebook.com/stremio/>
<http://twitter.com/stremio>
<http://www.instagram.com/stremioofficial/>
<http://www.reddit.com/r/Stremio/>
<http://blog.stremio.com/>
<https://play.google.com/store/apps/details?id=com.stremio.beta>
<https://itunes.apple.com/us/app/stremio/id987232010?mt=8>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My schema looks like this :
var Projects = new LinvoDB("projects",{ projects : [{ name :String, shots : [{ name : String, order : Number, versions :[{ name:String, frames : [], comments :[{ content : String, user :String, date:Date }] }] }] }] }, { filename :'interface/db/newDB' }) var p = new Projects();
When I do :
p.projects.push({'name':project})
it doesn't work, the p.projects remains empty array.
The push works on array items but not objects only with the LinvoDB schema. Because I also manually created another normal object and when I try to use push the same way it works. It looks like this :
var mydb = { projects : [{ name :'myProject', shots : [{ name : 'shot_01', order : 0, versions :[{ name:"v01", frames : [], comments :[{ comment : 'blablabla', user :'username', date:'12/12/12' }] }] }] }] }
The
mydb.projects.push({'name':project});
works perfectly in this case.The text was updated successfully, but these errors were encountered: