How to use _id of one collection in to another collection
s
sandip_armal
started a topic
over 6 years ago
Hi,
I have 5 collections, Every collection have auto generated `_id `which is in string format. So now my question is to how can i use `_id` of one collection in another collection because` _id` is same in every collection.
Example:
Suppose i have challenge and progress collections. so i want to use _id of challenge collection in to progress collection but progress collection already have own `_id`.
1 Comment
E
Edward
said
over 6 years ago
Hey,
you probably want to use a `KinveyReference` object for this. You can define this is as a field within your entities, and it will map to an entity in another collection. Check out our documentation on this, here: http://devcenter.kinvey.com/android/guides/datastore#RelationalData and let me know if you have any more questions!
sandip_armal
I have 5 collections, Every collection have auto generated `_id `which is in string format. So now my question is to how can i use `_id` of one collection in another collection because` _id` is same in every collection.
Example:
Suppose i have challenge and progress collections. so i want to use _id of challenge collection in to progress collection but progress collection already have own `_id`.