Open Closed

Bug Issue in ABP Suite #5134


User avatar
0
rwright-ruhealth created

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.2.2
  • UI type: MVC
  • DB provider: EF CORE
  • Tiered (MVC) or Identity Server Separated (Angular): yes (TIERED)
  • Exception message and stack trace: BUILD ERROR when creating Book Tutorial Identifier Expected. Type Expected
  • Steps to reproduce the issue:"Create a Books project using ABP Suite and the Books Tutorial Create A books class of AuditedAggregate Root and some fields.
  • Save and Build the project. Run the DBMigrator if needed. Run the Web App. Should work fine.
  • Add a BookType Class with a string property of Type and Aggregate Root. Choose to Make the Type field ReadOnly on Update. Save.. Save and Generate.
  • ** Build fails.**
  • The problem upon examination of the code:
  • ABP suite puts 2 commas in the domain class Update method; Does not put the keyword Type in the update method of the class, which is correct. It does put the extra comma.
  • In ABP suite, Change the Name from Type to BookType.
  • Save. Save and Generate. Build Fails. the comma problem still exists, the BookType is omitted from the UpdateAsync method (AS IT SHOULD BE, since it was chosen as READONLY on update)
  • The problem is that the ABP Suite Code Generator for READONLY on update forgets to remove the comma associated with the omitted field.
* public async Task<BookType> UpdateAsync(
            int id,  /****SHOULD NOT have A BookType field which is Correct. However, should not have the comma on the next line either.***/
            , [CanBeNull] string concurrencyStamp = null
        )
        {

            var bookType = await _bookTypeRepository.GetAsync(id);

            bookType.SetConcurrencyStampIfNotNull(concurrencyStamp);
            return await _bookTypeRepository.UpdateAsync(bookType);
        }
        
This occurs in all update methods. Removing the extra comma allows the project to build.
I expect not  to have this count against my alloted support questions as it is a BUG.
Thank you.

2 Answer(s)
  • User Avatar
    0
    gizem.kurt created
    Support Team QA Test Engineer

    We have an issue for this bug, it will be fixed in the next release.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    The bug is tracked in an internal issue. Thanks for reporting. The question credit is refunded.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11