HHH-6605: More conflicts merging
This commit is contained in:
parent
a00f23c6f6
commit
89bb7ec175
|
@ -1,6 +1,7 @@
|
|||
package org.hibernate.envers.entities.mapper.relation;
|
||||
|
||||
import org.hibernate.NonUniqueResultException;
|
||||
import org.hibernate.engine.spi.SessionImplementor;
|
||||
import org.hibernate.envers.configuration.AuditConfiguration;
|
||||
import org.hibernate.envers.entities.PropertyData;
|
||||
import org.hibernate.envers.exception.AuditException;
|
||||
|
@ -51,4 +52,17 @@ public abstract class AbstractOneToOneMapper extends AbstractToOneMapper {
|
|||
*/
|
||||
protected abstract Object queryForReferencedEntity(AuditReaderImplementor versionsReader, EntityInfo referencedEntity,
|
||||
Serializable primaryKey, Number revision);
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void mapModifiedFlagsToMapFromEntity(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mapModifiedFlagsToMapForCollectionChange(String collectionPropertyName, Map<String, Object> data) {
|
||||
if (getPropertyData().isUsingModifiedFlag()) {
|
||||
data.put(getPropertyData().getModifiedFlagPropertyName(), collectionPropertyName.equals(getPropertyData().getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,15 +54,4 @@ public class OneToOneNotOwningMapper extends AbstractOneToOneMapper {
|
|||
.add(AuditEntity.relatedId(owningReferencePropertyName).eq(primaryKey))
|
||||
.getSingleResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mapModifiedFlagsToMapFromEntity(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mapModifiedFlagsToMapForCollectionChange(String collectionPropertyName, Map<String, Object> data) {
|
||||
if (propertyData.isUsingModifiedFlag()) {
|
||||
data.put(propertyData.getModifiedFlagPropertyName(), collectionPropertyName.equals(propertyData.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,19 +69,19 @@ public class ToOneIdMapper extends AbstractToOneMapper {
|
|||
|
||||
@Override
|
||||
public void mapModifiedFlagsToMapFromEntity(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) {
|
||||
if (propertyData.isUsingModifiedFlag()) {
|
||||
data.put(propertyData.getModifiedFlagPropertyName(), checkModified(session, newObj, oldObj));
|
||||
if (getPropertyData().isUsingModifiedFlag()) {
|
||||
data.put(getPropertyData().getModifiedFlagPropertyName(), checkModified(session, newObj, oldObj));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mapModifiedFlagsToMapForCollectionChange(String collectionPropertyName, Map<String, Object> data) {
|
||||
if (propertyData.isUsingModifiedFlag()) {
|
||||
data.put(propertyData.getModifiedFlagPropertyName(), collectionPropertyName.equals(propertyData.getName()));
|
||||
if (getPropertyData().isUsingModifiedFlag()) {
|
||||
data.put(getPropertyData().getModifiedFlagPropertyName(), collectionPropertyName.equals(getPropertyData().getName()));
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkModified(SessionImplementor session, Object newObj, Object oldObj) {
|
||||
protected boolean checkModified(SessionImplementor session, Object newObj, Object oldObj) {
|
||||
//noinspection SimplifiableConditionalExpression
|
||||
return nonInsertableFake ? false : !Tools.entitiesEqual(session, referencedEntityName, newObj, oldObj);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue