-
Notifications
You must be signed in to change notification settings - Fork 223
增加支持在ResultMap中使用连续属性访问对结果集对象中的嵌套属性赋值; #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
nbut-xzy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码文件的字符编码从GBK修正为UTF-8;
nbut-xzy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释乱码。同时,建议去掉里面的中英文混合注释,还有类似这样的示例注释(例如 User.Address.City)
| /// Gets the final property in the chain (��ȡ�����������һ������) | ||
| /// Note: Setter is explicitly disabled for immutability (Setter ����ʽ�����Ա�֤���ɱ���) | ||
| /// </summary> | ||
| public PropertyInfo Property { get => property; set => throw new NotSupportedException(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Property为何不直接定义为只读。PropertyInfo Property { get; }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释太多了(中英文混合)
| { | ||
| internal interface IPropertyHolder | ||
| { | ||
| PropertyInfo Property { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议 PropertyInfo Property { get; }
功能改进 / Feature Enhancements
新增核心接口与实现 / Added Core Interface and Implementations
IPropertyHolder接口,统一属性访问逻辑Added
IPropertyHolderinterface to unify property access logicPropertyHolder类继承自IPropertyHolderModified
PropertyHolderto inherit fromIPropertyHolderPropertyChainHolder类实现嵌套属性链支持Added
PropertyChainHolderclass to support nested property chains嵌套属性映射支持 / Nested Property Mapping Support
EntityDeserializer.ResolveProperty方法,支持解析如NestedProp1.NestedProp2的连续属性路径Modified
EntityDeserializer.ResolvePropertyto resolve chained property paths (e.g.,NestedProp1.NestedProp2)EntityDeserializer.CreateDeserialize方法,自动初始化空嵌套对象Modified
EntityDeserializer.CreateDeserializeto auto-initialize null nested objects测试覆盖 / Testing
Added unit tests for nested property mapping
Validated multi-level object initialization and data integrity
影响范围 / Impact
IPropertyHolder.cs,PropertyHolder.cs,PropertyChainHolder.cs,EntityDeserializer.csEntityDeserializerTest.cs,AllPrimitive.xml,NestedEntity.cs示例场景 / Example Usage