When updating an derived entity containing several field, not all changed fields will be updated Having a base entity containing two fields named checksum and variantName and a derived entity containing one field named fileSize. Create an database entry,
change all fields of the existing database entry (see testcase testWithDynamicUpdate)
The following update statement will be created
Only checksum and fileSize will be updated, but not the field variantName. Problem occurs in file AbstractEntityPersister in function resolveDirtyAttributeIndexes. ch The dirty fields will be sorted bei name
In the for loop the fields in attributeNames will be compared to the array attributeMappings, which contains the mapping informations according to the annotations. attributeMappings has the following order:
The for loop does only recognize the fields checksum and fileSize. variantName will not be processed. A sample project with test case can be found here |