我有结算实体
@Entity
@Table(name = "settlement")
public class Settlement {
@ManyToOne
@JoinColumn(name = "subscription_x_product_id")
private ProductSubscription productSubscription;
与ProductSubscription实体相关
@Entity
@Table(name = "subscriptionproduct")
public class ProductSubscription {
@ManyToOne
@JoinColumn(name = "product_id")
private Product product;
与Product实体相关
@Entity
public class Product {
@Transient
private String enabled;
在产品实体中,我已启用了使用@ org.springframework.data.annotation.Transient注释的字段.
我也有存储库
public interface SettlementRepository extends JpaRepository
当我调用SettlementRepository.findAll();它给出异常引起:com.microsoft.sqlserver.jdbc.SQLServerException:无效的列名’enabled’.
如何忽略从DB加载的启用字段?