If a @onetomany(cascade = cascadetype.ALL) in class "A" refers to a superclass(abstract or not) of an inheritance hierarchy (class "B") and this superclass have not the relative @manytoone property - in order to map a strong relation from A to B as also described in the ebean manual on page 52) Ebean FAILS to insert the relative "A" foreign keys when it tries to save the B instances( Ebean.save(someAinstance); )
The expected result should be a successful cascade save operation seen that the annotation presents a cascadetype.ALL attribute.
Please note that the expected behaviour is present if instead of a superclass, the @onetomany point to a "normal" class (i.e. either not a superclass or a subclass of some class).
Ebean should provide the expected behaviour and cascade persist all the referenced instances regardless of their nature. (i.e. it should always insert the right foreign keys).
Thanks for the testcase.
The issue here is that this is a unidirectional relationship ... and Ebean is not going up the inheritance hierarchy to get the appropriate 'unidirectional shadow property'.
Fixed in HEAD.