小编oua*_*him的帖子

如何添加不同的属性以使用 jpa 规范进行查询

我正在使用 jhipster 标准和 jpa 规范来实现用于研究的端点。

好吧,它正在工作,但继续向我发送重复项。

有这个模型的prestations

public class Prestation extends AbstractAuditingEntity implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;

@NotNull
@Column(name = "jhi_label", nullable = false)
private String label;

@Column(name = "description")
private String description;

@Column(name = "unit")
private String unit;

@NotNull
@Column(name = "activated", nullable = false)
private boolean activated;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("prestations")
private SubCategory subCategory;

@OneToMany(mappedBy = "prestation", cascade = …
Run Code Online (Sandbox Code Playgroud)

distinct criteria-api criteriaquery spring-data-jpa

2
推荐指数
1
解决办法
6889
查看次数