-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing tests when using hibernate and fixing nested joins
+ Fixing tests when using hibernate + Fixing an issue where nested joins fail with an IllegalStateException: Illegal attempt to dereference path source + Adding a test case for the nested join
- Loading branch information
ivelkov
committed
Aug 15, 2017
1 parent
60d0d77
commit 7b0d722
Showing
6 changed files
with
99 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/test/java/com/github/tennaito/rsql/jpa/entity/ObjTags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) Axway Software, 2017. All Rights Reserved. | ||
* | ||
*/ | ||
|
||
package com.github.tennaito.rsql.jpa.entity; | ||
|
||
import java.util.List; | ||
|
||
import javax.persistence.CascadeType; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.OneToMany; | ||
|
||
|
||
@Entity | ||
public class ObjTags extends AbstractTestEntity{ | ||
|
||
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true) | ||
private List<Tag> tags; | ||
|
||
public List<Tag> getTags() { | ||
return tags; | ||
} | ||
|
||
public void setTags(List<Tag> tags) { | ||
this.tags = tags; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/test/java/com/github/tennaito/rsql/jpa/entity/Tag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) Axway Software, 2017. All Rights Reserved. | ||
* | ||
*/ | ||
|
||
package com.github.tennaito.rsql.jpa.entity; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
|
||
/** | ||
* Created by ivelin on 2/24/17. | ||
*/ | ||
@Entity | ||
public class Tag extends AbstractTestEntity { | ||
|
||
@Column(name = "TAG", nullable = false) | ||
private String tag; | ||
|
||
public String getTag() { | ||
return tag; | ||
} | ||
|
||
public void setTag(String tag) { | ||
this.tag = tag; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters