koblass
27 Nov 2011, 1:33 AM
Hi,
I've nested data and I'm wondering how I could handle it properly with the data model.
I do understand the hasMany option, but what about "hasOne" ?
For instance I've data like this :
{
propertyText: 'test',
propertyInt: 20,
propertyComplex: {
name: 'my name',
value: 'my value
}
}
How do I map the propertyComplex property ?
Same question for the simple arrays (arrays of string, int, etc..)
For instance:
{
propertyText: 'test',
propertyInt: 20,
propertyArray: [
'my value1',
'my value 2'
]
}
Best regards
Daniel
I've nested data and I'm wondering how I could handle it properly with the data model.
I do understand the hasMany option, but what about "hasOne" ?
For instance I've data like this :
{
propertyText: 'test',
propertyInt: 20,
propertyComplex: {
name: 'my name',
value: 'my value
}
}
How do I map the propertyComplex property ?
Same question for the simple arrays (arrays of string, int, etc..)
For instance:
{
propertyText: 'test',
propertyInt: 20,
propertyArray: [
'my value1',
'my value 2'
]
}
Best regards
Daniel