You could star issue 1767, and if enough people do, google might come
up with a solution.

http://code.google.com/p/googleappengine/issues/detail?id=1767

On Sep 25, 6:12 am, bryce cottam <[email protected]> wrote:
> In my app (as in many apps I imagine) there are relationships that I
> end up managing in the code.
>
> For instance, a Parent class with a list of Child instances.  In order
> to make each child in it's own entity group, I have the list of
> children defined on the Parent as
> List<Key> children;
>
> and on the Child class, I've got a Key instance that is a reference to
> the parent.
> Key parentKey;
>
> However, there is no way that I can seen to ensure that the entity
> referenced by any given Key instance in my list is indeed an instance
> of Child, or that the Key on the Child instance actually points to an
> instance of a Parent.
>
> I remember reading some kind of enhancement request looking for some
> kind of generically typed Key class, something like:
> Key<T>
>
> so, in order to have a Key you know is of a certain type you do:
> List<Key<Child>> children;
>  or something similar.  And for the Child's reference to it's parent you'd do:
> Key<Parent> parentKey;
>
> has anyone found a good way to get some type safety with respect to Keys?
>
> thanks in advance,
> -bryce
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to