Use the hypersistence-utils library to map the pgvector column to a List of doubles. Add hypersistence-utils-hibernate to your pom, then annotate the entity field with the json type mapping and columnDefinition 'vector': a private List embedding field with @Type(type = 'json') and @Column(columnDefinition = 'vector'). That lets you save and load embeddings through JpaRepository; write custom native queries for nearest-neighbor search.

Context: Stack Overflow #76553746 (accepted answer, 8 votes): What JPA + Hibernate data type should I use to support the vector extension in a PostgreSQL database, so that it allows me to create embeddings using a JPA Entity? ``` CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3)); ``` pgvector