0
ndeol@woolworths.com.au created
- ABP Framework version: v8.0.2
- UI Type: Angular
- Database System: MongoDB
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
This I abp implementation when saving Audit Porperty Changes. As in MongoDb Case I am adding custom Entity Change object which Is bigger as its in Sterilized object. But Implementation we currently have Truncate the Value before Audit Information is saved. There is no way to override it either. Can you explain how can I override **EntityPropertyChangeConsts.MaxNewValueLength
** , If not Then Any other way to set the value on NewValue as its protected Set.
[DisableAuditing]
public class EntityPropertyChange : Entity<Guid>, IMultiTenant
{
public virtual Guid? TenantId { get; protected set; }
public virtual Guid EntityChangeId { get; protected set; }
public virtual string NewValue { get; protected set; }
public virtual string OriginalValue { get; protected set; }
public virtual string PropertyName { get; protected set; }
public virtual string PropertyTypeFullName { get; protected set; }
protected EntityPropertyChange()
{
}
public EntityPropertyChange(
IGuidGenerator guidGenerator,
Guid entityChangeId,
EntityPropertyChangeInfo entityChangeInfo,
Guid? tenantId = null)
{
Id = guidGenerator.Create();
TenantId = tenantId;
EntityChangeId = entityChangeId;
**NewValue = entityChangeInfo.NewValue.Truncate(EntityPropertyChangeConsts.MaxNewValueLength);**
OriginalValue = entityChangeInfo.OriginalValue.Truncate(EntityPropertyChangeConsts.MaxOriginalValueLength);
PropertyName = entityChangeInfo.PropertyName.TruncateFromBeginning(EntityPropertyChangeConsts.MaxPropertyNameLength);
PropertyTypeFullName = entityChangeInfo.PropertyTypeFullName.TruncateFromBeginning(EntityPropertyChangeConsts.MaxPropertyTypeFullNameLength);
}
}
2 Answer(s)
-
0
Hi,
you can set
MaxNewValueLength
in the DomainShared module and add a new migrations file.public class ...DomainSharedModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { EntityPropertyChangeConsts.MaxNewValueLength = 10000 } }
-
0
Thanks That worked