question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AuditedAttribute on property creating history for every property

See original GitHub issue
  • Abp package version: 3.8.2
  • framework: .Net Core.

If we create following entity it will create record for every property in EntityPropertyChanges table instead of just MyProperty2.

public class MyEntity : Entity
{
    public string MyProperty1 { get; set; }

    [Audited]
    public int MyProperty2 { get; set; }

    public long MyProperty3 { get; set; }
}

After checking the code in EntityHistoryHelper. The condition should be if (!entityType.GetTypeInfo().IsDefined(typeof(AuditedAttribute), true))

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
acjhcommented, Sep 26, 2018

@sachinarora87 Fixed in ABP v3.8.3.

0reactions
sachinarora87commented, Sep 20, 2018

@acjh : I was talking about following example. I can override all properties and use DisableAuditing on it. But it will be nice if I can specify Audited on property on which I want to audit.

[Audited]
public class MyEntity : AuditedEntity
{
    [DisableAuditing]
    public string MyProperty1 { get; set; }

    public int MyProperty2 { get; set; }

    [DisableAuditing]
    public long MyProperty3 { get; set; }
}

thanks for you help @ismcagdas & @acjh

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Entities and Attributes for Auditing
Enabling auditing​​ By setting the IsAuditEnabled property of an entity's metadata and the IsAuditEnabled property of each desired attribute's ...
Read more >
Tracking and auditing changes to data
The activity compares the current values of the tracked properties with their previous values, and writes a history detail instance for each ......
Read more >
Implementing Audit Trail Reporting - 11g Release 4 (11.1.4)
Audit Trail is a history of the changes that have been made to data in Oracle ... and attributes names the display name...
Read more >
The AUDIT_DATA table
Column name Column description Data type ID The ID of the log record NUMERIC AUDIT_LOG The ID of the log record in the AUDIT_LOG table...
Read more >
How to include specific property to changes part Audit.Net
I guess you're using Audit.EntityFramework library. Note the Changes property on the audit event output will only include the columns that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found