简体   繁体   中英

Querying a nullable @OneToOne relationship with JPA (inverse way)

My case is just the converse of this other question: Querying a nullable @OneToOne relationship with JPA

How can I filter the null values of the non-SQL attribute of a @OneToOne relationship on the mappedBy side. The cited question dealt with the @JoinColumn side.

SELECT e2
FROM Entity1 e1 RIGHT OUTER JOIN e1.entity2 e2
WHERE e1 IS NULL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM