Apigee Usergrid: Does usergrid allow subcollections?

203 views Asked by At

I understand that in usergrid UI I can create an Individual collection , but it does not allow me to create a collection under a collection. Is there a way of doing that . Otherwise we will be forced to write business logic in the proxy layer which we don't want to do.

With Regards -S

1

There are 1 answers

2
rockerston On BEST ANSWER

There is no concept of subcollection, but you can use connections. So you can do something like this:

POST cats/fluffy/hasa/toys/ball

The above would mean that that an entity of type "cat" is connected to an entity of type "toy" that is called "ball" by a connection verb "hasa".

You can also store sub-objects in an individual entity (e.g. full JSON is supported). If you want to describe your use-case a bit more, I can maybe recommend other ways to structure your data.