Active
Project:
Entity JS
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2012 at 08:44 UTC
Updated:
14 Sep 2012 at 09:07 UTC
I think it would be nice if there was a better way of creating new entities, or perhaps specifically when setting fields in entities. I believe entity_js is setting the fields in a traditional way e.g.:
values = {
"name": "username",
"mail": "username@example.com",
"field_test": {
"und": {
"2": {
"value": "foo"
}
}
}
}
Would be nice if it was like:
values = {
"name": "username",
"mail": "username@example.com",
"field_test": ['foo', 'bar', 'baz'],
}Not yet sure how to do this but I'm currently experimenting with EntityDrupalWrapper and I think this is be doable. Will try to provide a patch when I get around this.