如何否定几个谓词

时间:2018-12-06 15:05:09

标签: java spring-data-jpa predicate specifications

我有两个实体

__()

@Entity
@Table(name = SIGNAL")
public class TradingSignal {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID", nullable = false, unique = true)
    private int id;

    @Column(name = "SIGNAL_ID")
    private int signalId;

    @Column(name = "TICKER", length = 6)
    private String ticker;

    @OneToMany(cascade = CascadeType.ALL)
    private Set<TsUsed> tsUsedSet;
}

如何找到@Entity @Table(name = "TS_USED") public class TsUsed { @Id @Column(name = "FILTER_ID", nullable = false) @GeneratedValue(strategy = GenerationType.AUTO) private int filterId; @Column(name = "USER_ID_LSB") private long userIdLsb; @Column(name = "USER_ID_MSB") private long userIdMsb; @Column(name = "VISIBLE") private boolean visible; @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "ID", nullable = false) private TradingSignal tradingSignal; } 中不存在TradingSignalTsUseduserIdLsbTsUsed的所有userIdMsb

无法创建有效的谓词。

此代码不适用于我

tsUsedSet

0 个答案:

没有答案