关于瞬态场
我有一个类,它在该类中实现了持久性和瞬态布尔成员。我注意到,认为他的变量被声明为瞬态,但它的状态正在被持久化。我该如何解决这个问题。请帮忙。提前致谢。
I have a class which implements persistable and a transient boolean member in this class. I noticed that thought he variable is declared as transient its state is being persisted. How do i over come this issue. Kindly help. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Blackberry 的持久性机制不考虑
瞬态
。可能的解决方案是:Hashtable
这样通用的东西)仅用于持久化,然后复制到“真实”对象中被加载,然后写回到虚拟对象中进行保存。(请参阅此论坛帖子)
Blackberry's persistence mechanism does not respect
transient
. Possible solutions are:Hashtable
) only for persistance, copying out into the "real" object after it is loaded and then writing back into the dummy object for saving.(See this forum thread)