We're updating the issue view to help you get more done. 

Wrong getter function being called

Description

Sometimes, due to unknown reasons com.hibernate.property.Getter invokes getter on wrong model function

1 2 3 4 5 6 7 8 9 10 11 12 13 14 public void setLukket(CXDate lukket) { this.datoLukket = lukket; } @Type(type = TYPE_CXDATE) public CXDate getLukket() { return this.datoLukket; } //Old method name ("isLukket") would sometimes confuse hibernate(reflect) and made it call this as "datoLukket" getter @Transient public boolean isCloseNotNull() { return (getLukket() != null); }

I've tracked down issue up to org.hibernate.tuple.entity.AbstractEntityTuplizer where getter would invoke "isLukket" rather than "getLukket" sometimes. Again, im not sure why, did not track it any further. However it would occur while working with same database entries every time. The entry which would cause it wasn't any different than other that would work (on same model) and I didn't notice anything else abnormal.
Defining column name in annotation would not help.
Probably obviously - the issue resulted in illegalargumentexception (expected CXDate - would get boolean instead) in my case, not sure what other data would help.

table.sql contains script for table creation of the model which has these getters

Environment

Database Oracle 12c, Java 1.8.0_131, wildfly 9.0.2

Status

Assignee

Unassigned

Reporter

Medardas

Components

Affects versions

4.3.10

Priority

Minor