The Unified and Autonomous Development Platform
Make OnDelete working with MySQL. But still not working with HSQLDB
robin shine87642a787f2f
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultRepositoryManager.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultRepositoryManager.javaindex 64af809230..3f92568525 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultRepositoryManager.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/manager/impl/DefaultRepositoryManager.java@@ -114,8 +114,6 @@ public class DefaultRepositoryManager implements RepositoryManager, LifecycleLisdao.remove(repository);- FileUtils.deleteDir(storageManager.getRepoDir(repository));-dao.afterCommit(new Runnable() {@Override@@ -126,6 +124,7 @@ public class DefaultRepositoryManager implements RepositoryManager, LifecycleLis} finally {idLock.writeLock().unlock();}+ FileUtils.deleteDir(storageManager.getRepoDir(repository));}});diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Comment.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Comment.javaindex 1fb0f42e3e..b058abd023 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Comment.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/Comment.java@@ -11,6 +11,7 @@ import javax.persistence.Embedded;import javax.persistence.Entity;import javax.persistence.FetchType;import javax.persistence.JoinColumn;+import javax.persistence.Lob;import javax.persistence.ManyToOne;import javax.persistence.OneToMany;@@ -43,6 +44,7 @@ public class Comment extends AbstractEntity {@ManyToOne(fetch=FetchType.LAZY)private User user;+ @Lob@Column(nullable=false, length=65535)private String content;diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/CommentReply.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/CommentReply.javaindex c5c67b68a3..ff15ad0ff2 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/CommentReply.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/CommentReply.java@@ -6,6 +6,7 @@ import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.FetchType;import javax.persistence.JoinColumn;+import javax.persistence.Lob;import javax.persistence.ManyToOne;import com.pmease.commons.hibernate.AbstractEntity;@@ -23,6 +24,7 @@ public class CommentReply extends AbstractEntity {@Column(nullable=false)private Date date;+ @Lob@Column(nullable=false, length=65535)private String content;diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.javaindex b439684857..88982ed242 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequest.java@@ -18,6 +18,7 @@ import javax.persistence.Embedded;import javax.persistence.Entity;import javax.persistence.FetchType;import javax.persistence.JoinColumn;+import javax.persistence.Lob;import javax.persistence.ManyToOne;import javax.persistence.OneToMany;import javax.persistence.Transient;@@ -140,6 +141,7 @@ public class PullRequest extends AbstractEntity {@Column(nullable=false)private String title;+ @Lob@Column(length=65535)private String description;diff --git a/gitplex.product/system/conf/hibernate.properties b/gitplex.product/system/conf/hibernate.propertiesindex 90c659447c..4c8780dcc9 100644--- a/gitplex.product/system/conf/hibernate.properties+++ b/gitplex.product/system/conf/hibernate.properties@@ -24,7 +24,7 @@ hibernate.connection.password=# sure all tables are of innodb type.#-----------------------------------------------------------------------------------#hibernate.dialect=org.hibernate.dialect.MySQLDialect+#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect#hibernate.connection.driver_class=com.mysql.jdbc.Driver#hibernate.connection.url=jdbc:mysql://localhost:3306/@dbName@#hibernate.connection.username=root