Solved.
I remove the (serialized = "true") from the list and add
pm.detacheCopy when I return data from the entity user.
Now it's work fine.





On Nov 16, 11:14 pm, ale <aleee...@gmail.com> wrote:
> Hello,
> I have an entity and I want to menage some contacts, so I think to
> include a list of contact in the entity, the list of contats are a
> list of PrimiryKey of other User.
> It is all ok eccept whene I try to delete a contact. I don't receive
> error, but the contact will not delete.
>
> this is the user:
>
> class UserDAO {
>
>         @Persistent
>         @PrimaryKey
>         private String emailKey;
>         ....
>         @Persistent(serialized = "true")
>         private List<String> contacts;  // in the list other emailKey...
>
> }
>
> in the business  class
>
>         @Override
>         public void removeContact(User user, User contact) {
>                 PersistenceManager pm = PMF.get().getPersistenceManager();
>                 try {
>                         UserDAO userDao = pm.getObjectById(UserDAO.class, 
> user.getEmailKey
> ());
>                         userDao.getContacts().remove(contact.getEmailKey());
>                         pm.makePersistent(userDao);
>                 } finally {
>                         pm.close();
>                 }
>
>         }
>
> I don't understand where is the mistake... (the similar  method
> addContact work fine...)
>
> thanks!
>
> Ale

--

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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=.


Reply via email to