Does Hibernate always need a setter when there is a getter?

Posted by Marcus on Stack Overflow See other posts from Stack Overflow or by Marcus
Published on 2010-04-20T16:08:34Z Indexed on 2010/04/20 16:13 UTC
Read the original article Hit count: 289

Filed under:
|
|

We have some Hibernate getter methods annotated with both @Column and @Basic.

We get an exception if we don't have the corresponding setter. Why is this?

In our case we are deriving the value returned from the getter (to get stored in the DB) and the setter has no functional purpose. So we just have an empty method to get around the error condition..

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about java