jakartaee / jakartaee/persistence
Join map key
- Dominant language
- Java
- Stars
- 268
- Forks
- 78
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
`MapJoin.key()` return a Path which can not be a join source. For example,
```java
@Entity
public class Store {
@ElementCollection(fetch=FetchType.LAZY)
Map inventory;
}
@Entity
public class Merchandise {
@ManyToOne
Supplier supplier;
}
CriteriaQuery criteriaQuery = criteriaBuilder.createCriteriaQuery(Store.class);
Root root = criteriaQuery.from(Store.class);
root.joinMap("inventory").key().join("supplier");
```
The `key()` return a `Path` that can not join any association or element collection. Join source must be a `From`.
1. need a way to specify the lazy fetch type for map key (Merchandise)?
2. need a way to join or join fetch map key (Merchandise)?
Contributor guide
Research direction
Start with the MapJoin.key(), Path, and From entry points described in the issue, using the Store, Merchandise, and inventory example as the reproduction. Determine the API change needed to make a map key usable for joining or fetching and to specify lazy fetching, then verify that the supplier join and map-key behavior are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100