在持久化期间忽略 JPA 字段的最简单方法是什么? [英] What is the easiest way to ignore a JPA field during persistence?
本文介绍了在持久化期间忽略 JPA 字段的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我本质上是在寻找@Ignore"类型的注释,我可以用它来阻止特定字段被持久化.如何实现?
I'm essentially looking for a "@Ignore" type annotation with which I can stop a particular field from being persisted. How can this be achieved?
推荐答案
@Transient
符合您的需求.
@Transient
complies with your needs.
这篇关于在持久化期间忽略 JPA 字段的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文