-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed the persistence of multi-level entities at jnosql-mongodb
Signed-off-by: Maximillian Arruda <dearrudam@gmail.com>
- Loading branch information
Showing
5 changed files
with
71 additions
and
2 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
11 changes: 11 additions & 0 deletions
11
jnosql-mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration/BookOrder.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,11 @@ | ||
package org.eclipse.jnosql.databases.mongodb.integration; | ||
|
||
import jakarta.nosql.Column; | ||
import jakarta.nosql.Entity; | ||
import jakarta.nosql.Id; | ||
|
||
import java.util.List; | ||
|
||
@Entity | ||
public record BookOrder(@Id String id, @Column List<BookOrderItem> items){ | ||
} |
8 changes: 8 additions & 0 deletions
8
...mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration/BookOrderItem.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,8 @@ | ||
package org.eclipse.jnosql.databases.mongodb.integration; | ||
|
||
import jakarta.nosql.Column; | ||
import jakarta.nosql.Entity; | ||
|
||
@Entity | ||
public record BookOrderItem(@Column Book book, @Column Integer quantity) { | ||
} |
8 changes: 8 additions & 0 deletions
8
jnosql-mongodb/src/test/java/org/eclipse/jnosql/databases/mongodb/integration/BookStore.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,8 @@ | ||
package org.eclipse.jnosql.databases.mongodb.integration; | ||
|
||
import jakarta.data.repository.Repository; | ||
import org.eclipse.jnosql.mapping.NoSQLRepository; | ||
|
||
@Repository | ||
public interface BookStore extends NoSQLRepository<BookOrder, String> { | ||
} |
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