Yes, I think it could be quite useful so yes I think we can certainly look to add this feature.
I'm not 100% clear on the behaviour though so if you want to define/clarify the behaviour that would be great. Specifically in relation to the standard JPA cascade=CascadeType.ALL etc.
My thoughts is that you typically would want to use it with a CascadeType.ALL.
@OneToMany(cascade=CascadeType.ALL)
@DeleteOrphan
List details;
... and what this means is that any element removed from the list is going to be deleted when you save the bean.
If this is the correct/desired behaviour... then technically I think Ebean would only need to listen for removals (it doesn't need to listen for additions as they are saved via the existing CascadeType.ALL behaviour.
I assume that a clear() ... would have the effect of deleting all the elements in the list? What if the list has not been loaded yet?
Anyway, if that sounds about right ... I don't that would be too hard to implement. Just need to split the "modify listening" behaviour into "modify listen additions" and "modify listen removals"... as we only need to listen and register the removals.
How does that sound?
Cheers, Rob.