Java 8 Optional in entity field

Viewed 1281

Can I use Optional in fields of hibernate entity? Maybe with some custom user type?

I know I can use it in methods using AccesType.FIELD (I use AccesType.FIELD anyway).

Why I want this? Well, I want to stay as far away from nulls as possible.

1 Answers
Related