JPA 관계를 찾지 못할 때

1
2
3
4
5
6
7
8
9
10
11
class Computer {
    
    private Cpu cpu;

    @org.hibernate.annotations.NotFound(action=NotFoundAction.IGNORE)
    private Ssd ssd;

    @org.hibernate.annotations.NotFound(action=NotFoundAction.IGNORE)
    private Hdd hdd;

}

어노태이션을 설정하면 Ssd나 Hdd를 찾지 못하는 경우 무시를 해주도록 설정할 수 있다.