Recently, a poster on StackOverflow asked how to design the “perfect” JPA entity.
He had been working with Hibernate for some time, but still found himself struggling with questions as property type & accessibility, immutable properties, and equals/hashCode implementation.
So here are some answers.