add indexes to jpa entities
This commit is contained in:
parent
2a57624054
commit
43feef5b42
|
@ -37,7 +37,6 @@
|
|||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -72,7 +71,6 @@
|
|||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</plugin>
|
||||
<!--<plugin>-->
|
||||
<!--<groupId>net.alchim31.maven</groupId>-->
|
||||
|
|
|
@ -4,8 +4,11 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(indexes = {@Index(columnList="customerId")})
|
||||
public class CustomerRewardsAccount {
|
||||
|
||||
@Id
|
||||
|
|
|
@ -4,10 +4,14 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Calendar;
|
||||
|
||||
@Entity
|
||||
@Table(indexes = {@Index(columnList="customerRewardsId")})
|
||||
public class Transaction {
|
||||
|
||||
@Id
|
||||
|
|
|
@ -2,6 +2,6 @@ spring.h2.console.enabled=true
|
|||
spring.datasource.url=jdbc:h2:mem:testdb
|
||||
spring.datasource.driverClassName=org.h2.Driver
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=password
|
||||
spring.datasource.password=
|
||||
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
|
||||
|
||||
|
|
Loading…
Reference in New Issue