Skip to content

EditDialog 弹窗中复合对象属性不为空验证及编辑弹窗中通过id后台数据库取数赋值后保存提示为null #7534

Closed

Description

@Tony-ST0754

Which class is this unit test associated with?

Image

BlazorApp2-complextest..zip

Activity

  1. bb-auto commented on Jan 16, 2026

    @bb-auto

    @Tony-ST0754 Thank you for submitting. We will give feedback later.

  2. added this to the v10.2.0 milestone on Jan 16, 2026
  3. Tony-ST0754 commented on Jan 17, 2026

    @Tony-ST0754
    CollaboratorAuthor

    第2个Demo,通过ID在编辑弹窗中从数据库获取要编辑的数据,复现对象相应属性为null

    Image

    BlazorApp2--通过ID后台取数.zip

  4. changed the title [-]chore(table): EditDialog弹窗中复合对象属性不为空验证问题[/-] [+]chore(table): EditDialog弹窗中复合对象属性不为空验证及编辑弹窗中通过id后台数据库取数赋值后保存提示为null[/+] on Jan 17, 2026
  5. Tony-ST0754 commented on Jan 17, 2026

    @Tony-ST0754
    CollaboratorAuthor

    Demo2的问题,难道是从后台取数后,不能直接

     Model = await GetDateAsync();
    
    

    是需要

      Test t1 = await GetDateAsync();
      Model.id = t1.id;
      Model.FullName = t1.FullName;
    
     //要这样一个个属性重新赋值回去吗
    
  6. Tony-ST0754 commented on Jan 17, 2026

    @Tony-ST0754
    CollaboratorAuthor

    Demo2的问题,难道是从后台取数后,不能直接

     Model = await GetDateAsync();
    

    是需要

      Test t1 = await GetDateAsync();
      Model.id = t1.id;
      Model.FullName = t1.FullName;
    
     //要这样一个个属性重新赋值回去吗
    

    还真是这样,传到编辑弹窗里面的对象,不能重new它,Model = await GetDateAsync();这样相当于重新new它了

    web,让我有了新的认知

  7. Tony-ST0754 commented on Jan 17, 2026

    @Tony-ST0754
    CollaboratorAuthor

    Demo2的问题,难道是从后台取数后,不能直接

     Model = await GetDateAsync();
    

    是需要

      Test t1 = await GetDateAsync();
      Model.id = t1.id;
      Model.FullName = t1.FullName;
    
     //要这样一个个属性重新赋值回去吗
    

    还真是这样,传到编辑弹窗里面的对象,不能重new它,Model = await GetDateAsync();这样相当于重新new它了

    web,让我有了新的认知

    搞定,已通过AutoMap,搞定了

  8. changed the title [-]chore(table): EditDialog弹窗中复合对象属性不为空验证及编辑弹窗中通过id后台数据库取数赋值后保存提示为null[/-] [+]EditDialog 弹窗中复合对象属性不为空验证及编辑弹窗中通过id后台数据库取数赋值后保存提示为null[/+] on Jan 17, 2026
  9. locked and limited conversation to collaborators on Jan 17, 2026
  10. converted this issue into a discussion #7535 on Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreThis are tasks or bot action

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions