Ends in:
4 DAYS
7 HRS
51 MIN
0 SEC
Ends in:
4 D
7 H
51 M
0 S
Open Closed

Repository interface with 'Customizable code' checked is implemented by base repository instead of extended repository #6083


User avatar
0
PasionaDev2 created
  • ABP Framework version: v7.4.0
  • UI Type: Doesn't matter.
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  1. Create project in abp suite 7.4.0
  2. Create an entity (for example Foo) with the Customizable code option checked and generate the code
  3. Add a custom method definition in the IFooRepository.Extended.cs
  4. Because of the generated code and the interface rules, the method has to be implemented at the level of the FooRepository.cs instead of FooRepository.Extended.cs.
  5. The next regeneration of code for the entity Foo with the abp suite will erase the implementation of the method and will make the build fail.

Expected behaviour

The implementation of the interface should be at the level of the FooRepository.Extended.cs not at the level of FooRepostiory.cs. Should be the same behaviour as the AppServices.

Actual behavior

The implementation of the interface is at the level of the FooRepository.cs.

Workaround

Templates can be change in order to fix the generated code. The changed templates are Server.Repository.CustomCode.EfCoreRepository.Extended.txt and Server.Repository.EfCoreRepository.txt. the I%%entity-name%%Repository should be added in the first one and removed in the second one.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Thanks for the information, we have noticed this problem, and it is expected to be fixed in the next patch version.

    Your ticket was refunded.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35