abp icon indicating copy to clipboard operation
abp copied to clipboard

Issue with generated proxy with self referencing to DTO class

Open Feramor opened this issue 1 year ago • 3 comments

ABP Version: 8.0.2

  • [X] I have searched the existing issues

Generated self referencing DTO's has issues given below;

Backend Implementations

[Serializable]
public class EntityDtoWithConcurrencyStamp<Tkey> : EntityDto<Tkey>, IHasConcurrencyStamp
{
    [DisableAuditing] public string ConcurrencyStamp { get; set; }
}

public class OptionDto<Tkey>
{
    public string Key { get; set; }
    public Tkey Value { get; set; }
}

public class CascadeOptionDto<Tkey> : OptionDto<Tkey>
{
    public List<CascadeOptionDto<Tkey>> Childs { set; get; }
}

Expected behavior

image

image

Actual behavior

image

image

Feramor avatar Feb 07 '24 05:02 Feramor

I have the same type of bug aswell, from ABP 5.2 all the way to ABP 8, easiest way is to delete the additional Tkey import, although I have no idea why this keeps happening to me too.

ryanrocksize5 avatar Feb 16 '24 09:02 ryanrocksize5

Related to https://github.com/abpframework/abp/issues/19656

steffbeckers avatar May 23 '24 12:05 steffbeckers

The problem occurs from server in this line > also this line. @maliming can we add GenericArgument to TypeSimple and Type properties, even property is DTO itself ?

Sample DTO

image

Excepted (generate-proxy.json)

image

Actual (generate-proxy.json)

image

masum-ulu avatar May 29 '24 12:05 masum-ulu