api - Kinvey one-to-many relationship -
i have 2 collections - categories , products. category have array of products. how can create needed relation objects? have products column content 1 category:
{ "_type":"kinveyref" "_id":"574a889c0ee767ef41d9a3d7" "_collection":"products" }
how can create one-to-many relationship?
artem,
assuming have maintained array of product ids in category collection, can expand product information, querying individual product ids, in postfetch hook category collection.
following link implementing collecion hooks:
http://devcenter.kinvey.com/ios/guides/business-logic#collection-hooks
thanks, pranav kinvey support
Comments
Post a Comment