Add Index on Dept.pid in Dept.java

pull/295/head
wtune 2020-03-13 16:12:50 +08:00 committed by GitHub
parent a62b017a02
commit 7c81232e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,8 @@ import java.util.Set;
@Entity
@Getter
@Setter
@Table(name="dept")
@Table(name="dept",
indexs={@Index(name="idx_pid",columnList="pid")})
public class Dept implements Serializable {
@Id
@ -66,4 +67,4 @@ public class Dept implements Serializable {
public int hashCode() {
return Objects.hash(id, name);
}
}
}