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

Object with multiple arrays #20

Closed
kdauzickas opened this issue Jul 7, 2012 · 6 comments
Closed

Object with multiple arrays #20

kdauzickas opened this issue Jul 7, 2012 · 6 comments
Labels
bug
Milestone

Comments

@kdauzickas
Copy link

@kdauzickas kdauzickas commented Jul 7, 2012

Seems genghis cannot correctly save or display objects that have multiple arrays in them.
Error

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Jul 7, 2012

Can you give me a sample document?

@kdauzickas
Copy link
Author

@kdauzickas kdauzickas commented Jul 7, 2012

{"attributes" : [ "der", "dsa" ], "title" : "product one", "description" : "first test product", "created" : "2012-01-01", "active" : "yes", "deleted" : "no", "tags" : [ "tag1", "tag2", "tag3" ], "urlTitle" : "test-product-one" }

@patrickgalbraith
Copy link

@patrickgalbraith patrickgalbraith commented Aug 24, 2012

This happened to me too however the issue doesn't have anything to do with arrays.

It is caused by using a key called attributes.

This works:

{
    "attributes2": [1, 2]
}

This doesn't work:

{
    "attributes": [1, 2]
}
@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Aug 25, 2012

In Backbone.js Model classes, attributes is a magic property — that's where all the actual model values are stored. This probably had something to do with this.

I've updated to the latest version of Backbone in the develop branch. I can't reproduce this bug there, so I think it's probably fixed. Do me a favor and check out the latest version and let me know if it isn't fixed?

https://github.com/bobthecow/genghis/tree/develop

@patrickgalbraith
Copy link

@patrickgalbraith patrickgalbraith commented Aug 25, 2012

@bobthecow thanks I can confirm that the latest from the develop branch works well.

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Sep 5, 2012

Great, thank you.

Resolving this issue, it'll be released in the upcoming v2.0 release.

@bobthecow bobthecow closed this Sep 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.