Alfaville
Alfaville

Reputation: 553

How to make an Entity read-only or JPA entities immutables?

I want avoid updates undue with Ebean, because it happens to Hibernate(@Immutable) and EclipseLink(@ReadOnly).

Upvotes: 0

Views: 4851

Answers (1)

Rob Bygrave
Rob Bygrave

Reputation: 4031

So as an answer:

Just remove the setter methods and make the bean immutable that way.

Upvotes: 1

Related Questions