Hello Vincenzo, Is there any reason you would need to keep the original copy of the contact entry? If this entry can be trashed, you should simply go ahead and modify its groupMembershipInfo list. The entry can always be easily retrieved from the API.
Best, Alain On Fri, Feb 3, 2012 at 4:15 AM, Vincenzo Guerrisi < [email protected]> wrote: > Hi, > in order to implement some sort of contacts synchronization capability > between users of the same domain, I'm trying to copy a ContactEntry from > one account to another one using Java APIs. > Once I get a ContactEntry copy (by using the constructor which takes > another ContactEntry as parameter in order to perform a shallow copy), I > need to modify the group membership info before inserting this contact into > the new account (otherwise I get the exception: "Referenced group > doesn't belong to the same user" as the groups refer to the original > owner), but it seems that, due to the shallow copy, the two objects share > the same groups list. > Is there a way to solve this problem aside from manually copying every > field in the ContactEntry structure? > > -- > You received this message because you are subscribed to the Google > Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html > -- Alain Vongsouvanh | Developer Programs Engineer -- You received this message because you are subscribed to the Google Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html
