Have you seen our CTO's post about [data modeling in Kinvey](http://www.kinvey.com/blog/3732/data-modeling-in-kinvey "data modeling in Kinvey")? Is there some specific Android topic you wanted more information about?
almost 9 years ago
Thanks for your reply, i seen your CTO's post, and i also see its developer documentation on
Log.d(TAG, "saved data for entity "+ r.getName());
over 8 years ago
`KinveyReference`s are used to create a reference between two entities possibly across collections. So, using your data, you could have a `MyEntity` in `Collection_1`, the contains a reference to a `NewEntity` in `Collection_2`.
So, within your `MyEntity`, there is a `private KinveyReference invitations;`, as well as that `initReferences(...)` method.
First, there are a couple issues with that `initReferences(...)` method. It looks like it takes an `InvitationEntity` instead of a `NewEntity`, and assumes the collection is `TestTableWin` instead of `Collection_2`.
then, in the second code snippet, both a `MyEntity` and a `NewEntity` need to be created, and then call `event.initReference(myNewEntit)`, which will set the reference. Then, after that, call save.