Browse Source

处理jpa自动插入外键约束

yuj 7 years ago
parent
commit
4fa838b8ac

+ 0 - 14
src/main/java/com/uas/platform/b2c/prod/commodity/model/V_ProductPerson.java

@@ -205,12 +205,6 @@ public class V_ProductPerson implements Serializable{
     @Column(name = "pr_matchsize")
     private Integer matchsize;
 
-    /**
-     * 匹配结果
-     */
-    @OneToMany(mappedBy = "product", cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
-    private Set<ProductMatchResult> matchresults;
-
     /**
      * 封装
      */
@@ -523,14 +517,6 @@ public class V_ProductPerson implements Serializable{
         this.matchsize = matchsize;
     }
 
-    public Set<ProductMatchResult> getMatchresults() {
-        return matchresults;
-    }
-
-    public void setMatchresults(Set<ProductMatchResult> matchresults) {
-        this.matchresults = matchresults;
-    }
-
     public String getEncapsulation() {
         return encapsulation;
     }

+ 0 - 14
src/main/java/com/uas/platform/b2c/prod/commodity/model/V_ProductPrivate.java

@@ -202,12 +202,6 @@ public class V_ProductPrivate implements Serializable {
     @Column(name = "pr_matchsize")
     private Integer matchsize;
 
-    /**
-     * 匹配结果
-     */
-    @OneToMany(mappedBy = "product", cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
-    private Set<ProductMatchResult> matchresults;
-
     /**
      * 封装
      */
@@ -545,14 +539,6 @@ public class V_ProductPrivate implements Serializable {
         this.matchsize = matchsize;
     }
 
-    public Set<ProductMatchResult> getMatchresults() {
-        return matchresults;
-    }
-
-    public void setMatchresults(Set<ProductMatchResult> matchresults) {
-        this.matchresults = matchresults;
-    }
-
     public String getEncapsulation() {
         return encapsulation;
     }

+ 2 - 1
src/main/java/com/uas/platform/b2c/prod/store/model/StoreIn.java

@@ -175,7 +175,8 @@ public class StoreIn implements Serializable {
 	 * 资质证明信息集合
 	 */
 	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = Qualification.class)
-	@JoinColumn(name = "qu_store_id", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
+	@JoinColumn(name = "qu_store_id")
+	@org.hibernate.annotations.ForeignKey(name = "none")
 	private Set<Qualification> qualifications = new HashSet<>();
 
 	/**