Object with multiple arrays #20

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

Comments

Projects
None yet
3 participants
@kdauzickas

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

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jul 7, 2012

Owner

Can you give me a sample document?

Owner

bobthecow commented Jul 7, 2012

Can you give me a sample document?

@kdauzickas

This comment has been minimized.

Show comment
Hide comment
@kdauzickas

kdauzickas 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" }

{"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

This comment has been minimized.

Show comment
Hide comment
@patrickgalbraith

patrickgalbraith 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]
}

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Aug 25, 2012

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@patrickgalbraith

patrickgalbraith Aug 25, 2012

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

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

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Sep 5, 2012

Owner

Great, thank you.

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

Owner

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