Open Closed

LastModifiedId is not updating from update method in database getting null in lastmodifiedID column #4671


User avatar
0
aliya created
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

13 Answer(s)
  • User Avatar
    0
    salih created
    Support Team .NET Developer

    Hi, can you share the project version and your entity class?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aliya created

    Project version net6.0 entity class--- for all entities its not working not any particular entity

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    salih created
    Support Team .NET Developer

    What is the base class of your classes?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aliya created

    FullAuditedAggregateRoot<Guid>

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    salih created
    Support Team .NET Developer

    Can you share the bas class of dbcontext?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    salih created
    Support Team .NET Developer

    Is the LastModificationTime column null or data?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aliya created
    using System;
    using Volo.Abp.Auditing;
    
    namespace Volo.Abp.Domain.Entities.Auditing;
    
    /// <summary>
    /// Implements <see cref="IFullAuditedObject"/> to be a base class for full-audited aggregate roots.
    /// </summary>
    [Serializable]
    public abstract class FullAuditedAggregateRoot : AuditedAggregateRoot, IFullAuditedObject
    {
        /// <inheritdoc />
        public virtual bool IsDeleted { get; set; }
    
        /// <inheritdoc />
        public virtual Guid? DeleterId { get; set; }
    
        /// <inheritdoc />
        public virtual DateTime? DeletionTime { get; set; }
    }
    
    /// <summary>
    /// Implements <see cref="IFullAuditedObject"/> to be a base class for full-audited aggregate roots.
    /// </summary>
    /// <typeparam name="TKey">Type of the primary key of the entity</typeparam>
    [Serializable]
    public abstract class FullAuditedAggregateRoot<TKey> : AuditedAggregateRoot<TKey>, IFullAuditedObject
    {
        /// <inheritdoc />
        public virtual bool IsDeleted { get; set; }
    
        /// <inheritdoc />
        public virtual Guid? DeleterId { get; set; }
    
        /// <inheritdoc />
        public virtual DateTime? DeletionTime { get; set; }
    
        protected FullAuditedAggregateRoot()
        {
    
        }
    
        protected FullAuditedAggregateRoot(TKey id)
        : base(id)
        {
    
        }
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aliya created

    LastModificationTime is updating that is working as expected

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    How can we reproduce this in a template project?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aliya created

    Hi Could we connect for this issue on call

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I still need to reproduce the problem locally, Can you share some steps and code?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    aliya created
    1. create a entity in Database.
    2. try to insert record in database.
    3. update that record by updating lastmodifierId.

    var operation = await _operationRepository.GetAsync(id); operation.LastModificationTime = DateTime.UtcNow; operation.LastModifierId = await _authorizationHelper.GetCurrentUserId(); ObjectMapper.Map(input, operation); operation = await _operationRepository.UpdateAsync(operation, autoSave: true); return ObjectMapper.Map<Operation, OperationDto>(operation);

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Do you mean the LastModifierId of operation is null after _operationRepository.UpdateAsync(operation, autoSave: true);?

    Can you share a template project? liming.ma@volosoft.com

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.