Domain Object
@Getter
@Setter
@Entity
@Table(name = "member")
public class Member {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name ="member_id")
private Long memberId;
@Convert(converter = StringEncryptConverter.class)
private String email;
...
}
Repository
@Repository
public interface MemberRepository extends JpaRepository<Member, Long> {
Optional<Member> findOneByEmail(String email);
Optional<Member> findOneByEmailIgnoreCase(String email);
...
}
Converter works at calling findOneByEmail. (1) do not work at calling findOneByEmailIgnoreCase. (2) someone suggest that (2) case as below email doesn't bind upper(m.email). so converter not working.
select *
from member m
where upper(m.email) = upper(:email)
|