For attached classes calling aidConfiguration.getChipApplication().getId() allways returns null. Other properties, eg. aidConfiguration.getChipApplication().getVersion() returns correctly the value from DB. If chipApplication is not lazy loaded (see the comment in the code), then aidConfiguration.getChipApplication().getId() returns correct non-null value.
Linux bono 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-2)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.3
, is a final getter method supported for bytecode-enhanced entities when using field access?
yes. Even if a method is final, it's bytecode gets modified to call the right places.
To clarify... that is only ever a problem with proxing since the proxy is a subclass and would not be able to override the final super method. Bytecode enhancement does not generate a subclass, it literally rewrites that class's bytecode.
And in regards to proxying, both JPA and Hibernate (docs) clearly state that that is not a valid qualifier for a persistent attribute. You'd have to use field-access there.
Encountered the same issue with Hibernate 5.4.1.Final when using @ManyToOne(fetch = FetchType.LAZY) and final @Id accessors.
Dropping the final keyword is working just fine.