remove comments
This commit is contained in:
parent
09eaca9914
commit
567a71fdbc
|
@ -17,7 +17,6 @@ import org.hibernate.annotations.SQLDelete;
|
|||
@Entity
|
||||
@Table(name = "tbl_products")
|
||||
@SQLDelete(sql = "UPDATE tbl_products SET deleted = true WHERE id=?")
|
||||
// @Where(clause = "deleted=false")
|
||||
@FilterDef(name = "deletedProductFilter", parameters = @ParamDef(name = "isDeleted", type = "boolean"))
|
||||
@Filter(name = "deletedProductFilter", condition = "deleted = :isDeleted")
|
||||
public class Product implements Serializable {
|
||||
|
|
|
@ -25,7 +25,6 @@ public class ProductService {
|
|||
}
|
||||
|
||||
public Iterable<Product> findAll(boolean isDeleted){
|
||||
//return productRepository.findAll();
|
||||
Session session = entityManager.unwrap(Session.class);
|
||||
Filter filter = session.enableFilter("deletedProductFilter");
|
||||
filter.setParameter("isDeleted", isDeleted);
|
||||
|
|
|
@ -5,18 +5,5 @@ spring.jpa.properties.hibernate.order_inserts=true
|
|||
spring.jpa.properties.hibernate.order_updates=true
|
||||
spring.jpa.properties.hibernate.generate_statistics=true
|
||||
|
||||
# JPA-Schema-Generation
|
||||
# Use below configuration to generate database schema create commands based on the entity models
|
||||
# and export them into the create.sql file
|
||||
#spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create
|
||||
#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql
|
||||
#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-source=metadata
|
||||
#spring.jpa.properties.hibernate.format_sql=true
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
|
||||
# spring.datasource.url=jdbc:mysql://localhost:3306/db_products?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
|
||||
# spring.datasource.username=root
|
||||
# spring.datasource.password=root
|
||||
|
||||
# spring.jpa.hibernate.ddl-auto= update
|
||||
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
Loading…
Reference in New Issue