是否可以插入新的@Immutable实体

发布于 2024-10-24 04:40:51 字数 239 浏览 3 评论 0原文

我有一个只想插入的实体。我找到的所有文档都说用 @Immutable 无法更新,小“u”更新。我需要知道的是是否可以插入新的不可变实例?该实体是一个日志条目,所以我只需要插入。没有更新也没有删除。

I have an entity I want to be insert only. All of the documentation I've found says that an entity annotated with @Immutable cannot be updated, small "u" updated. What I need to know is whether a new immutable instance can be inserted? The entity is a log entry, so I just need the insert. No updates nor deletes.

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

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

发布评论

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

评论(1

风吹雨成花 2024-10-31 04:40:51

是的,可以插入 @Immutable 实体。

但请注意,集合上的 @Immutable 意味着不能对集合进行任何添加或删除。

Yes, @Immutable entities can be inserted.

Note however that @Immutable on a Collection means that no additions or deletions to/from the Collection can happen.

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