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

数据源容器支持“先从 A 找,找不到再从 B 找……”的场景 #297

Open
Createsequence opened this issue May 28, 2024 · 0 comments
Labels
enhancement New feature or request worth trying Features or improvements that are worth trying but not necessarily achievable

Comments

@Createsequence
Copy link
Collaborator

Createsequence commented May 28, 2024

在实际使用中,经常会面临 “先从 A 找,找不到再从 B 找……” 这类场景,希望从数据源容器的层面基于支持,比如:

@Assemble(
    container = "user", 
    candidateContainers = { "tenant", “organization” }, // 指定候补容器
    props = "name"
)
private Integer id;

在上述示例中,将先根据 ID 从 user 容器中查询,如果查不到再依次从 tenantorganization 容器中查询。

由于目前 AssembleOperationHandlerAbstractBeanOperationExecutor 都是以容器为单位执行操作的,因此需要考虑如何兼容这部分逻辑。

@Createsequence Createsequence added enhancement New feature or request worth trying Features or improvements that are worth trying but not necessarily achievable labels May 28, 2024
@Createsequence Createsequence added this to the release 2.9.0 milestone May 28, 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 worth trying Features or improvements that are worth trying but not necessarily achievable
Projects
None yet
Development

No branches or pull requests

1 participant