Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support entity references [DATAJDBC-112] #346

Closed
spring-projects-issues opened this issue Apr 12, 2017 · 1 comment
Closed

Support entity references [DATAJDBC-112] #346

spring-projects-issues opened this issue Apr 12, 2017 · 1 comment
Assignees
Labels
in: repository type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Apr 12, 2017

Jens Schauder opened DATAJDBC-112 and commented

If an entity references another entity the referenced entity should get persisted with the original entity.

So:

 LegoSet set = new LegoSet("Awesome Truck");
 set.setManual(new Manual("Just plug everything together"));

 repository.save(set)

should result in two inserts. One into the table LegoSet, the other into the table Manual


Referenced from: pull request #9

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jul 21, 2017

Jens Schauder commented

The PR contains changes not only for this issue but also for DATAJDBC-104 and DATAJDBC-114

@spring-projects-issues spring-projects-issues added in: repository type: enhancement labels Dec 31, 2020
mp911de pushed a commit that referenced this issue Feb 21, 2022
We now support distinct derived queries that are useful with projections to retrieve distinct results.

interface UserRepository extends Repository<User, Long> {

  Mono<UserProjection> findDistinctByFirstName(String firstName);

}

interface UserProjection {

  String getFirstName();

}

Original pull request: #346.
mp911de added a commit that referenced this issue Feb 21, 2022
Consider projection properties as SELECT projection. Refactor distinct() into marker method without accepting a boolean flag. Make distinct field final. Update tests.

Original pull request: #346.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants