That's fine Juan...
Actually, I'm editing Contact with Editor framework via
RequestFactoryEditorDriver...
List of phones are edited by my custom editor on the base of
ListEditor:
public class PhoneEditor extends Composite implements
IsEditor<ListEditor<PhoneProxy, PhoneEditView>> {
...
@Override
public void deleteClicked(PhoneNumEditView view) {
int index=listEditor.getEditors().indexOf(view);
if(index!=-1){
PhoneNumProxy proxy=listEditor.getList().get(index);
listEditor.getList().remove(index);
}
}
...
}
When delete btn clicked, I simply remove phone item from ListEditor.
When 'Save' btn clicked I just simply persisting Contact, so Editor
framework do all it's magic by mapping UI dat to object...
Again, all things stop working when I'm adding 'orphanRemoval=true' to
Contact annotation... Without that, I can add, edit phones in the list
and it works perfectly...
On Mar 9, 7:58 pm, Juan Pablo Gardella <[email protected]>
wrote:
> Sorry my english... Where are you do the operation? Paste the code
>
> Juan
>
> 2011/3/9 Juan Pablo Gardella <[email protected]>
>
> > Where are you this? Post the code
>
> > Juan
>
> > 2011/3/9 Vasily <[email protected]>
>
> > Hi All, have simple case:
>
> >> @RooJavaBean
> >> @RooToString
> >> @RooEntity
> >> public class Contact {
>
> >> @OneToMany(cascade=CascadeType.ALL, fetch = FetchType.EAGER,
> >> mappedBy="contact", orphanRemoval=true)
> >> private List<Phone> phoneList = new ArrayList<Phone>();
> >> }
>
> >> @RooJavaBean
> >> @RooToString
> >> @RooEntity
> >> public class Phone{
> >> private String phone;
>
> >> @ManyToOne(optional = false)
> >> private Contact contact;
> >> }
>
> >> I want to remove Phone items from DB table as soon as I'm removing
> >> them from Contact.phoneList so I found I can use 'orphanRemoval=true'.
>
> >> All works fine, until I'm adding 'orphanRemoval=true' to
> >> annotations... After that, I have no errors, but any changes to
> >> entities not persisting at all... :/
>
> >> MySql 5.5.8
> >> Hibernate 3.6.1 (3.6.0 also tested with same results)
>
> >> Ideas? Thx!
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Web Toolkit" 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-web-toolkit?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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-web-toolkit?hl=en.