Код: Выделить всё
@Entity
@Table(name = "signing_keys")
@Getter
@Setter
public class SigningKeysEnt {
@Id
private Long id;
@Column(name = "encrypted_private_key")
private String encryptedPrivateKey;
@Column(name = "public_key")
private String publicKey;
@Column(name = "protocol_version")
private String protocolVersion;
@Column(name = "signature_algorithm")
private String signatureAlgorithm;
@Column(name = "expiration_date")
private Date expirationDate;
}
Код: Выделить всё
public interface AuthorRepository extends JpaRepository {
@Query(value = "SELECT * FROM author WHERE key = :obj.publicKey", nativeQuery = true)
List findByFirstName(@Param("obj") SigningKeysEnt obj);
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... tive-query