JPA one-to-many filtering

前端 未结 4 1907
遇见更好的自我
遇见更好的自我 2021-02-05 05:20

We are nesting several entities. However upon retrieving we only want to get those entities which are active.

@Entity
public class System {
  @Id
  @Column(name          


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 05:45

    There is no JPA way, but you can try Hibernate filetrs: http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#objectstate-filters

提交回复
热议问题