Skip to content

Commit 6d702bb

Browse files
committed
Fixed #128
1 parent 754ecb5 commit 6d702bb

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/main/java/org/woehlke/simpleworklist/application/testdata/TestDataServiceImpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ public TestDataServiceImpl(ProjectRepository projectRepository, TaskRepository t
3838

3939
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
4040
public void createTestCategoryTreeForUserAccount(UserAccount userAccount) {
41-
List<Context> contexts = contextRepository.findByUserAccount(userAccount);
42-
Iterator<Context> iterator = contexts.iterator();
43-
Context contextWork = iterator.next();
4441
log.info("----------------------------------------------");
4542
log.info("createTestCategoryTreeForUserAccount");
4643
log.info("----------------------------------------------");
44+
log.info("userAccount: "+userAccount.toString());
45+
log.info("----------------------------------------------");
46+
Context contextWork = userAccount.getDefaultContext();
47+
log.info("contextWork: "+contextWork.toString());
48+
log.info("----------------------------------------------");
4749
Date nowDate = new Date();
4850
long now = nowDate.getTime();
4951
String name01 = "test01_" + now;

src/main/java/org/woehlke/simpleworklist/context/Context.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@Getter
3636
@Setter
3737
@NoArgsConstructor
38-
@EqualsAndHashCode(callSuper = true)
38+
@EqualsAndHashCode(callSuper = true, exclude = "userAccount")
3939
@ToString(callSuper = true, exclude = "userAccount")
4040
public class Context extends AuditModel implements Serializable, ComparableById<Context> {
4141

src/main/java/org/woehlke/simpleworklist/project/Project.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
)
3737
@Getter
3838
@Setter
39-
@EqualsAndHashCode(callSuper = true)
40-
@ToString(callSuper = true, exclude = "children")
39+
@EqualsAndHashCode(callSuper = true, exclude = {"children","parent"})
40+
@ToString(callSuper = true, exclude = {"children","parent"})
4141
public class Project extends AuditModel implements Serializable, ComparableById<Project> {
4242

4343
private static final long serialVersionUID = 4566653175832872422L;

0 commit comments

Comments
 (0)