"varunmehta" wrote:
Adding this fixed the ManytoOneType issue
if (!"_identifierMapper".equals(property.getName())) {
if (propertyType instanceof ImmutableType) {
// Last but one parameter: ids are always insertable
mainGenerator.getBasicMetadataGenerator().addBasic(parent,
getIdPersistentPropertyAuditingData(property),
property.getValue(), mapper, true, key);
} else if (propertyType instanceof EntityType) {
// Last but one parameter: ids are always insertable
mainGenerator.getBasicMetadataGenerator().addBasic(parent,
getIdPersistentPropertyAuditingData(property),
property.getValue(), mapper, true, key);
} else {
But this solution correct, if so let me know I'll provide it as a patch.
BTW, you have encountered the same issue I had a few days ago: I posted it on this forum too and opened a JIRA:
https://jira.jboss.org/jira/browse/ENVERS-76
Now Adam can happily close it as you have obviously resolved the problem.