-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
4
-
None
-
None
-
None
-
None
-
None
-
None
-
None
After we have finished simple embedding of both BsonArray and BsonDocument (only one embedding level required), now this ticket will achieve the goal of arbitrary levels and/or structure (mixing both, e.g. array of STRUCT or STRUCT include an array field).
E.g. given the following entity class:
@Entity @Table(name = "movies") static class Movie { @Id int id; String title; TagsByAuthor[] tagsByAuthorList; } @Embeddable @Struct(name = "TagsByAuthor") static class TagsByAuthor { @Column(name = "commenter") String author; List<String> tags; }
it should work as expected for both persisting and loading.
The gist of this ticket is to allow for some recursive embedding code logic covering both array and STRUCT.
PoC testing case is at https://github.com/NathanQingyangXu/jpa-mongodb-mapping/blob/main/chameleon-core/src/test/java/org/hibernate/omm/type/struct/StructTests.java
PoC PR is at https://github.com/NathanQingyangXu/jpa-mongodb-mapping/pull/40
- depends on
-
HIBERNATE-59 Support @Struct aggregate embeddable mapping
-
- In Code Review
-
-
HIBERNATE-58 Support arrays/collections mapping
-
- In Progress
-