FindByUUID() using Spring Data's JPA Repository

前端 未结 4 519
面向向阳花
面向向阳花 2020-12-21 15:39

for some reason I have not being able to find a suitable answer for this. I have the following simple entity:

@Entity
@Table(name = \"simple_entity\")
@Acce         


        
4条回答
  •  攒了一身酷
    2020-12-21 16:17

    I tackled the same question recently, and if someone stumbles up here, the solution for me was to annotate the column with

    @Column(name = "id", columnDefinition = "BINARY(16)")
    private UUID id;
    

    which solved the problem for me.

提交回复
热议问题