JPA + Hibernate: What type to use for vector extension in PostgreSQL?

is a PostgreSQL extension that provides support for vector values.

Question: What JPA + Hibernate data type should I use to support the pgvector extension in a PostgreSQL database, so that it allows me to create embeddings using a JPA Entity?

Given the following PostgreSQL table definition using the pgvector extension:

CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));

What JPA + Hibernate data type should I use to support this vector value in a JPA Entity?

To support the vector value in a JPA Entity for the pgvector extension in a PostgreSQL database, you should use the @Type(type = "org.hibernate.type.PostgresUUIDType") annotation for the embedding field in your JPA Entity class.