Open dimitrisLas opened 3 months ago
Hello,
The specifications result on type mismatch in scenarios like the following: We have 2 entities:
@Entity class Entity1 ( var name: String ): IdEntity<Long>()
and
@Entity @Table class Entity2( @ManyToOne(cascade = [CascadeType.ALL]) val entity1: Entity1, val name: String ): IdEntity<UUID>()
Then using the following endpoint we get a DateTimeParseException even thought the type is long.
DateTimeParseException
@GetMapping fun getEntity2( pageable: Pageable, @And( Spec(path="entity1.id", params = ["entity1Id"], onTypeMismatch = OnTypeMismatch.EXCEPTION, spec = Equal::class), Spec(path = "name", spec = LikeIgnoreCase::class) ) searchSpecification: Specification<Entity2>? ): ResponseEntity<Page<Entity2>> = ResponseEntity.ok(entity2Repository.findAll(searchSpecification, pageable))
To reproduce the issue I created the following simple project
The issue can be verified either by:
{ "entity1": { "name": "entity-1-test" }, "name": "entity-2-test" }
Hello,
The specifications result on type mismatch in scenarios like the following: We have 2 entities:
and
Then using the following endpoint we get a
DateTimeParseException
even thought the type is long.To reproduce the issue I created the following simple project
The issue can be verified either by: