I have a problem with an appointment. A persistence is controlled with JPA and there is an annotation @where an entity that "fails" a value of 0 for that column anywhere it is made in that entity. If you are selecting an ID for example, hibernate will automatically be inserted where the column specified in @where is 0.
The problem is that now I have a where in that column where = 1 and hibertant overrides my where and bring only records with a value of 0.
My question is there any kind of ignoring this where only in my consultation? you will enter the code below.
Thank you!
SELECT blah blah blah
Here inner join with the table I have to do the inner join
inner join
minhatabela mtabela
on outratabela.id=mtabela.id_outratabela
and (
mtabela.coluna = 0 // This where automatically enters whenever this table is used due to the @where annotation in the entity
)
from
outratabela
where
outratabela.id=66666666
and minhatabela.coluna=1
My Entity
> @Entity @Table(name = "minhatabela") @Data @Builder @NoArgsConstructor
> @AllArgsConstructor @Where(clause = "coluna = 0")
// This annotation
> overwrites, but I can't remove it because it is used in every system and
> I would have to touch several points. public class MinhaTabela {
>
> ...........
Is there any way to ignore this annotation only in my criteria?
Thank you!