As a non native English speaker also, let me guess If I got you correctly,
dreamy
You want to manipulate Telephone separately, independent of its-owner-to-be,
so you will have a Telephone class.
Similarly, you will have another class for Person.
Because there're no dependency between creating of Person and Telephone, you
will not need to put those in the same transaction (entity group, you thread
subject was a bit confused) - just check Ikai's explanation above.
Now your need to represent when user buys/exchanges some phones? Can you try
this:
class Person {
....
List<Key> phones;
}
You might need to read relationship link above for more detail.
Thanks
On Thu, Mar 25, 2010 at 7:24 PM, dreamy <[email protected]> wrote:
> for instance, you can just use a Key and reference
> the Person in the Telephone.
>
> >>>>>you are right. and i just do it as you say.
>
> public class Telephone{
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> @Extension(vendorName="datanucleus", key="gae.encoded-pk",
> value="true")
> private String telephone_id;
>
> @Persistent
> private String person_id; //this field point to Person
> }
>
> my question is "
> if person have telephone( telephone1,telephone2,telephone3) and user
> update person's telephone is telephone2,telephone3,telephone4, how
> to implements this?
> "
>
> but in a same transactions , I need update 2 telephone
> object .----------telephone1.person_id=null
> telephone4.person_id=person_id.
> and the 2 telephone object is not in same entity group.
>
>
> the question seem to equal " how to update multi object (same
> class) in same transaction?"
>
>
> Thank you for your help
>
> --
> 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]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
--
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.