규칙의 입력 범위가 검증 위치를 결정한다
annotation 하나에 DB 조회와 권한 검사를 모두 넣지 않는다.
| 규칙 | 위치 | 이유 |
|---|---|---|
| 단일 field | component constraint | 빠른 client feedback |
| field 관계 | class constraint | 한 객체 안 비교 |
| 중복·권한 | service transaction | 현재 저장 상태 필요 |
annotation 하나에 DB 조회와 권한 검사를 모두 넣지 않는다.
| 규칙 | 위치 | 이유 |
|---|---|---|
| 단일 field | component constraint | 빠른 client feedback |
| field 관계 | class constraint | 한 객체 안 비교 |
| 중복·권한 | service transaction | 현재 저장 상태 필요 |