gpt4 book ai didi

java - eclipse 链接 JPA : combining @MappedSuperclass with @Cacheable

转载 作者:行者123 更新时间:2023-11-29 05:25:11 28 4
gpt4 key购买 nike

如果我用 @cachable(false) 注释映射的父类(super class),就像这样...

@MappedSuperclass
@Cacheable(false)
public abstract class MySuperclass {
...
}

...默认情况下所有子类实体都是不可缓存的吗?

我想我更普遍地问的是:实体是否从父类(super class)继承注解?

最佳答案

是的,@Cacheable 设置为 inherited by the subclasses并且可以被它们覆盖。

关于java - eclipse 链接 JPA : combining @MappedSuperclass with @Cacheable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22938677/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com