'Prevent specific @Entities to generate table - hibernate JPA
Is it possible to stop spring JPA from generating table for a specific entity ?
Reason: I want to put all my native sql queries into a separate object using @NamedNativeQuery. But @NameNativeQuery requires @Entity annotation. Due to that, and unwanted table is generated automatically. Is it possible to add an @Entity, and stop at the same time spring boot to generate table for that entity ?
P.S: I don't want to put the queries into the parent @entity, because there are too many queries. I want to have a good model structure.
My settings :
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=none
Spring Boot version : 2.3.3
Hibernate version : 5.6.7.Final
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
