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

Sanne Grinovero sanne at hibernate.org
Mon Jul 28 05:48:45 EDT 2014


We'd also love to support some features (especially the new user types
such as Date/Time) in Hibernate Search.

I don't think we should require Java8 for all users though, so I'd
like this to be an independent module.. troublesome with Maven though,
so this wasn't done yet.

--Sanne

On 28 July 2014 07:36, Gunnar Morling <gunnar at hibernate.org> wrote:
> 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
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list