remove comments

This commit is contained in:
Hendro Steven 2021-05-13 19:13:06 +07:00
parent 09eaca9914
commit 567a71fdbc
3 changed files with 1 additions and 16 deletions

View File

@ -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 {

View File

@ -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);

View File

@ -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