Hi All,
It appears that validating a collection, with something like @Size, that is not initialized causes it to attempt to initialize the collection:
Code:
01:53:55,587 ERROR [http-8080-Processor23] AssertionFailure:22 - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: collection [com.opterus.opscenter.model.common.Brand.regions] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
Is there a way to make the validator skip uninitialized collections?
I'm using version 3.0.0.ga of Hibernate Validator and version 3.3.0.ga of Hibernate Annotations common.
Thanks in advance,
Ian