Added flaging assignment. Coumetr froup infor needs to be added
This commit is contained in:
@ -4,6 +4,7 @@ import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
@ -21,9 +22,14 @@ public class Commision {
|
||||
private User commisionOwner;
|
||||
private Timestamp commisionDate;
|
||||
|
||||
@OneToMany(mappedBy = "commision")
|
||||
@OneToMany(mappedBy = "commision", fetch = FetchType.EAGER)
|
||||
private List<Assignment> assignments;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param user owner of commission. Can not be null otherwise saving commision
|
||||
* will fail.
|
||||
*/
|
||||
public Commision(User user) {
|
||||
this.commisionDate = new Timestamp(System.currentTimeMillis());
|
||||
this.commisionOwner = user;
|
||||
@ -44,4 +50,8 @@ public class Commision {
|
||||
return commisionOwner;
|
||||
}
|
||||
|
||||
public List<Assignment> getAssignments() {
|
||||
return this.assignments;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user