-
Notifications
You must be signed in to change notification settings - Fork 111
[BUG] - JsonConverter + .dto 的 flat 函数 出现生成解析错误 #937
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
Labels
bug
Something isn't working
Comments
目前较为尴尬的解决方式是:在 spec 内建立临时变量且去除 flat,后续查询时进行再次赋值,这能达到效果,但较为繁琐。 |
无法重现 |
先不关闭,我稍后再去测试下,并给出完整复现用例 |
我建立了一个仓库,用来复现此问题,这目前在我的机器上仍然无法进行编译 |
|
Try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jimmer Version
0.9.57
JDK Version
23 + kotlin 2.1.20-RC
Database
PostgreSQL
OS
Windows
Expected behavior
当 使用 flat 函数对 spec 对象进行平展时,如果携带有 @JsonConverter 则只会使用 当前 EntityProps.FIELD.unwrap().getConverter,而不是 flat 对象的 converter
Actual behavior
假定两个实体 A B ,A 包含 B 字段,为 A 建立 dto 文件且新建 spec ASpec。
如果此时进行 编译(特指 ksp),则会生成如下 _convert
Description
如上所述,此错误会造成编译错误
Reproduction steps
按照如上描述,嵌套建立即可
Generated SQL
No response
Relation Model
b { bJsonField: String? }
a { b }
Screenshots
Logs
e: file:///C:/project/tnmaster-server/build/generated/ksp/main/kotlin/com/tnmaster/dto/jimmer/userinfo/UserInfoAdminSpec.kt:122:30 Unresolved reference 'CERT_CODE'.
The text was updated successfully, but these errors were encountered: