-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26d360c
commit 97208e1
Showing
4 changed files
with
176 additions
and
0 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
30 changes: 30 additions & 0 deletions
30
project/jimmer-sql/src/test/java/org/babyfish/jimmer/sql/model/issue888/Item.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,30 @@ | ||
package org.babyfish.jimmer.sql.model.issue888; | ||
|
||
import org.babyfish.jimmer.sql.*; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.List; | ||
|
||
@Entity | ||
@Table(name = "issue888_item") | ||
public interface Item { | ||
|
||
@Id | ||
long id(); | ||
|
||
@Column | ||
String name(); | ||
|
||
@Nullable | ||
@ManyToOne | ||
Structure structure(); | ||
|
||
@ManyToOne | ||
Item parent(); | ||
|
||
@OneToMany( | ||
mappedBy = "parent", | ||
orderedProps = @OrderedProp("id") | ||
) | ||
List<Item> childItems(); | ||
} |
21 changes: 21 additions & 0 deletions
21
project/jimmer-sql/src/test/java/org/babyfish/jimmer/sql/model/issue888/Structure.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,21 @@ | ||
package org.babyfish.jimmer.sql.model.issue888; | ||
|
||
import org.babyfish.jimmer.sql.Entity; | ||
import org.babyfish.jimmer.sql.Id; | ||
import org.babyfish.jimmer.sql.OneToMany; | ||
import org.babyfish.jimmer.sql.Table; | ||
|
||
import java.util.List; | ||
|
||
@Entity | ||
@Table(name = "issue888_structure") | ||
public interface Structure { | ||
|
||
@Id | ||
long id(); | ||
|
||
String name(); | ||
|
||
@OneToMany(mappedBy = "structure") | ||
List<Item> items(); | ||
} |
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