Open Closed

Generating CRUD Pages From an Existing Database Table not generate Angular? #4225


User avatar
0
thuc.nghiem@techplus.vn created
  • ABP Framework version: v6.0.2
  • UI type: Angular
  • DB provider: EF Core, DB: Postgresql.
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: Code genated in "aspnet-core" but nothing is created in the directory "angular\src\app" .When i create new entity then generate in angular ok.
  • Steps to reproduce the issue:" step by step in link https://docs.abp.io/en/commercial/latest/abp-suite/generating-entities-from-an-existing-database-table
  • Success in 11/11 step *

7 Answer(s)
  • User Avatar
    0
    muhammedaltug created

    Hello,

    Can you send suite logs?

  • User Avatar
    0
    thuc.nghiem@techplus.vn created

    Hello, This is my logs:Abp suite Logs

  • User Avatar
    0
    muhammedaltug created

    Hello

    The error is [File Not Found] There is no file at "D:/TechPlus/Pln/Code/Tp.Tam/aspnet-core/.suite/entities/Branche.json" path.

    Can you check was file created? Can you check the file and parent folders have read permission?

  • User Avatar
    0
    thuc.nghiem@techplus.vn created

    Hi. I find in "D:\TechPlus\Pln\Code\Tp.Tam\aspnet-core.suite\entities" abp create file "AppBranches.json" not "Branches.json". "AppBranches" is the table in data that I load from a database to geneate code. "Branche" is new name. Because abp suite auto append "App" when create table in the database.

  • User Avatar
    0
    muhammedaltug created

    Hello

    The reason for this error difference between the entity name and the name of the database table. Did you change the entity name AppBranches to Branche? By the way, we created an internal issue about this situation.

    Can you try the angular side by running the command below in angular/.suite/schematics/ folder?

    node run-schematics.mjs "D:/TechPlus/Pln/Code/Tp.Tam/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" app-pro Tp.Tam "D:/TechPlus/Pln/Code/Tp.Tam/aspnet-core/.suite/entities/AppBranches.json" "D:/TechPlus/Pln/Code/Tp.Tam/angular" 
    
  • User Avatar
    0
    thuc.nghiem@techplus.vn created

    Yes, I did. Of course, the table name has to be changed when loading from another database. Need you to fix the error soon for abp suite to run correctly automatically. thanks!

  • User Avatar
    0
    muhammedaltug created

    Hello

    We fixed it. The fix will be available in the next version.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11