Skip to content

[Feature Request] - 支持自定义EnumScalarProvider #979

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

Closed
L1yp opened this issue Mar 30, 2025 · 1 comment
Closed

[Feature Request] - 支持自定义EnumScalarProvider #979

L1yp opened this issue Mar 30, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@L1yp
Copy link

L1yp commented Mar 30, 2025

Reason

目前jimmer在数据库的枚举映射中已经很完善,但是在序列化/反序列化枚举时无法优雅获取到@EnumItem中自定义的name/original.

Currently, jimmer is already very complete in the enumeration mapping of the database, but it is not possible to elegantly obtain the customized name/original in @EnumItem when serializing/deserializing the enumeration.

Description

允许自定义覆盖枚举的ScalarProvider, 或者让用户自行决定哪个字段类型使用哪个ScalarProvider.

Allows custom overriding of the enumeration's ScalarProvider, or allows users to decide which ScalarProvider to use for which field type.

Existing solutions

No response

@L1yp L1yp added the enhancement New feature or request label Mar 30, 2025
babyfish-ct added a commit that referenced this issue Apr 2, 2025
@babyfish-ct
Copy link
Owner

Try 0.9.71

PropScalarProviderFactory is added, it is used to answer the question jimmer to create PropScalarProvider implicitly

When jimmer-spring-starer is used it can be mangaed bean of spring, otherwise, it is configuration of sqlClient

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

2 participants