文字列オブジェクトのみのリストを作成できません
これは私のモデルがどのように見えるかです
class ProductSummary extends Realm.Object {}
ProductSummary.schema = {
name: 'ProductSummary',
properties: {
productId:'string',
name:'string',
description:'string',
rating:'int',
comments:'int',
categories:{type:'list',objectType:'string'},
images:{type:'list',objectType:'string'},
price:{type:'Price'}
}
};
これは、APIから取得する応答です
"productSummary": { "links": [], "productId": "PRD_1ola611nd0t", "name": "Sample", "description": "<p>Sample<br></p>", "categories": [ "CAT_1rua60fnd0u" ], "rating": 0, "comments": 0, "tags": [], "image": "http://test.testsite.com/testProject/app-images/189_66164247/189_42527954.jpeg", "price": { "lowest": 100, "highest": 100 } }
次のエラーが表示されます
Target Type 'string' doesn't Exists for property 'categories'
間違った方法でカテゴリ フィールドを作成していますか?