Open Closed

ABP-generated CRUD API: GetListAsync of Child Entity includes Master Entity ID in parameters but does not use it for filtering. #9009


User avatar
0
digitalservicegb created
  • ABP Framework version: v9.0.4
  • ABP Studio : v9.0.4
  • Database System: EF Core (SQL Server)

Hi,

When using ABP's auto-generated CRUD API, I noticed that for a child entity, a GetListAsync endpoint is generated, and its input DTO includes the master entity's ID. However, the GetListAsync API does not actually use the master entity's ID to filter the data.

I’m aware that ABP also generates a GetListBy<MasterEntityId>Async method, which does perform the filtering, but I still find it odd that the generic GetListAsync includes the master ID parameter without using it in the query.

Here’s an example from my project: I have two entities: PurchaseOrder (Master) and PurchaseOrderChange (Child).

  1. The PurchaseOrderChange input DTO for GetListAsync (In AppService) includes the PurchaseOrderId (Master Entity ID):

  2. However, the GetListAsync (In Repository) method does not use PurchaseOrderId to filter the results:

Is this the expected behavior by design? Or is there a configuration I’m missing?

Thanks in advance!


1 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    It seems it's not an expected situation. I'll deliver this problem to the ABP Suite team and inform you about if it's bug or not.

    Thanks

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13