On 5月20日, 午後10:40, Shinichi Ogawa <
shin1og...@gmail.com> wrote:
> mokkouyouさん
>
> 自分も同じ事で悩んだ事がありましたが、結局以下のようにして目的を実現する事にしています。
>
> 例でいうEmployeeクラス内で@Persistent ContactInfoを複数保持するのではなく、
>
> class Entity
> @Persistent Key myContactInfoKey
> @Persistent Key officeContactInfoKey
> ...
>
> のように、Employee側でContactInfoのKeyを保持してContactInfoの実体は別途取得する。
>
> または、
>
> class Employee
> @Persistent MyContactInfo myContactInfo
> @Persistent OfficeContactInfo officeContactInfo
> ...
>
> class MyContactInfo
> @Persistent ContactInfo contactInfo
> ...
>
> class OfficeContactInfo
> @Persistent ContactInfo contactInfo
> ...
>
> のように、関連の目的ごとに別Entityを作って保持する。
>
> GAEのデータストアでは、
> 親Entityが子Entityのキーをフィールドとして保持していないのかな?と思ってます。
>