[hibernate-dev] Adding support for Java 8's Optional to ORM

Gunnar Morling gunnar at hibernate.org
Mon Jul 28 02:36:32 EDT 2014


Hi,

Java 8 introduced a new type Optional which may be used to represent
objects which may be set or not set:

    private Optional<String> name;

Hibernate Validator will allow to validate properties of this type in the
next release. Now someone brought up the question whether the same is
planned for ORM, so one can use Optional in entity properties.

Any thoughts?

Thanks,

--Gunnar


More information about the hibernate-dev mailing list