是否可以插入新的@Immutable实体
我有一个只想插入的实体。我找到的所有文档都说用 @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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,可以插入
@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.