After migrating hibernate-tools-ant
from 6.1.7 to 6.2.7 the Minimal Constructors expected from PojoConstructors.ftl
are no longer generated. It appears the pojo.needsMinimalConstructor()
etc are faulty in the newer version.
Digging deeper shows that the relevant methods all rely on org.hibernate.mapping.Property.isOptional()
. This used to be implemented as return optional || isNullable();
but is now simply return optional;
.
The net result is that the minimal set of columns is the same as the full set.
Is this possibly a bug or a deliberate change? If deliberate, is there a way I can restore equivalent behaviour, i.e. treat a nullable column as optional?
P.S. I am reverse engineering from a Postgres database to forward engineer the POJOs.