支持Kotlin的数据类别的春季持久框架

发布于 2025-01-27 04:26:36 字数 129 浏览 3 评论 0原文

这个问题很简单,但是我找不到任何答案。

搜索后,我意识到Kotlin数据类不适用于Spring JPA,因为数据类是不可变的,并且不支持继承。

因此,我想知道JPA是否有任何支持数据类别的选择。

谢谢,

the question is simple, but I can't find any of answer about this.

After searching, I realize that kotlin data class is not suitable for Spring JPA because data class is immutable and does not support inheritance.

So, I wonder are there any alternatives for JPA which support data class.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扛起拖把扫天下 2025-02-03 04:26:36

我发现两个基于kotlin的ORM, ktorm 暴露

似乎两者都非常适合开始,并且支持数据类。
但是,在某个时候,我认为我需要移至 ktor 而不是我想在我想使用kotlin时而不是春季靴子Kotlin-Tic Way ..

I find two kotlin-based ORM, ktorm and exposed.

It seems both are very good for start, and it supports data class.
But, at some point, I thought that I need to move to ktor rather than Spring boot when I wanna use kotlin more kotlin-tic way..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文