[hibernate-dev] CascadeStyle, CascadeType etc

Hardy Ferentschik hardy at hibernate.org
Fri Jun 24 10:34:08 EDT 2011


On Fri, 24 Jun 2011 15:36:28 +0200, Steve Ebersole <steve at hibernate.org>  
wrote:


> First, I think CascadeType should be changed up a bit.  Currently it
> contains some "aggregate" values (ALL, ALL_DELETE_ORPHAN).  I'd like to
> keep this limited to just the "atomic" cascade-types.  Rather than the
> map lookups here based on the enum value, I'd much rather see the enum
> expose that "alternate value".  For example:  
> https://gist.github.com/1044751

Ok. The cascade style to cascade type map is new to me anyway.
Btw, why do you prefer the "enum expose that "alternate value"" approach?


> CascadeStyle cannot be made into an enum.  Well, that is if we keep the
> notion of org.hibernate.engine.spi.CascadeStyle.MultipleCascadeStyle to
> not do those "aggregated style" checks everywhere throughout the code  
> base.

OK. I believe you know the code better.



More information about the hibernate-dev mailing list