Skip to content
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

拆卸操作支持非平铺模式 #311

Closed
Createsequence opened this issue Jun 19, 2024 · 0 comments
Closed

拆卸操作支持非平铺模式 #311

Createsequence opened this issue Jun 19, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Createsequence
Copy link
Collaborator

目前,Crane4j 通过 @Disassemble 注解支持的拆卸操作实际上是先递归全部嵌套对象,最后再统一填充。

实际场景中,会有类似构建树结构的这种需求,比如下述这种情况:

public class A {
    private Integer bid;
    private B b;
}

public class B {
    private Integer cid;
    private C c;
}

使用时,需要:

  1. 先遍历 A,然后为每一个 A 对象填充 B;
  2. 再遍历每一个 A 中持有的 B,然后再为每一个 B 对象填充 C;
  3. 以此类推;

这个需求可以考虑通过一个新执行器 BeanOperationsExecutor 实现。

@Createsequence Createsequence added the enhancement New feature or request label Jun 19, 2024
Createsequence added a commit that referenced this issue Jun 23, 2024
Createsequence added a commit that referenced this issue Jun 23, 2024
Createsequence added a commit that referenced this issue Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant