jakartaee / jakartaee/data

Right/left joins in restriction API

Open
#1,281 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
150
Forks
37
Avg merge
4d 4h
Merged PRs (30d)
34

Description

It would be nice to have some way to specify (probably a vendor specific) strategy how to access an association.

`_Train.manufacturer.navigate(_TrainManufacturer.country).equalTo("Germany")`

The manufacturer in this case is an many-to-one association which needs to be joined at some point.
The idea would be to pass the join strategy to the navigate:

`_Train.manufacturer.navigate(_TrainManufacturer.country, CustomNavigateStrategies.RIGHT_JOIN).equalTo("Germany")`

Right now I have to join it in the Micronaut Data specific way:

```
@Find
@Join("manufacturer")
List findTrains(Restriction restriction);
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the restriction API's navigate association shown in the issue and compare it with the Micronaut Data @Join example. Determine how a caller would specify right or left join strategies and which API and provider behavior must support them. Done means the strategy can be expressed through navigate and its expected join behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.