I have this repository:
@Repository
public interface DomainRepository extends CrudRepository<Domain, String> {
Domain findByUuid(UUID uuid);
}
I have this entity:
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name="a", schema="b")
public class Domain {
@Id
private String id;
private UUID uuid;
}
But when I do
Domain d = domainRepository.findByUuid(UUID.randomUUID());
I get PSQLException: ERROR: operator does not exist: character varying = uuid (column type in table is VARCHAR).
How to fix this?