Closed GiuseppeBocci closed 1 year ago
to say all, the post suggested all the opposite.. anyway
Doesn't the answer say that Optional was intended for methods' return? Optional doesn't implement serializable and we are implementing the persistence, so is it better to not use Optional as a attribute?
it says that can be very good to use, even in different cases from history of java. to answer about persistence pls send mew a snippet of code with a Sample class you want to persist, with optional, so we can discussion in little the problem outside IS project.
Use an Optional as an attribute of a class is a bad practice https://stackoverflow.com/questions/29033518/is-it-a-good-practice-to-use-optional-as-an-attribute-in-a-class