Skip to content

Commit

Permalink
修复因删除Task对象中taskParticipators属性导致查询待处理任务失败的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
youseries committed May 20, 2019
1 parent b1e4114 commit d089d28
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions uflo-core/src/main/java/com/bstek/uflo/model/task/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@
******************************************************************************/
package com.bstek.uflo.model.task;

import java.util.Collection;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

import com.bstek.uflo.model.Activity;

@Entity
Expand Down Expand Up @@ -95,6 +102,11 @@ public class Task extends Activity{
@Column(name="BUSINESS_ID_",length=60)
private String businessId;

@JsonIgnore
@OneToMany(cascade=CascadeType.DETACH,fetch=FetchType.LAZY)
@JoinColumn(name="TASK_ID_")
private Collection<TaskParticipator> taskParticipators;

public long getProcessInstanceId() {
return processInstanceId;
}
Expand Down Expand Up @@ -262,4 +274,13 @@ public Integer getProgress() {
public void setProgress(Integer progress) {
this.progress = progress;
}

public Collection<TaskParticipator> getTaskParticipators() {
return taskParticipators;
}

public void setTaskParticipators(Collection<TaskParticipator> taskParticipators) {
this.taskParticipators = taskParticipators;
}

}

0 comments on commit d089d28

Please sign in to comment.