-
Notifications
You must be signed in to change notification settings - Fork 224
Fix embeddable projection retrieval #3774
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
Open
radovanradic
wants to merge
10
commits into
5.0.x
Choose a base branch
from
radovanradic/issue-3668
base: 5.0.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5346c0a
Fix embeddable retrieval
radovanradic 6453173
Improve nested embedded projection and added test for it.
radovanradic a2498a3
Test for jpa embedded projection
radovanradic 5ecc4db
Remove branch build trigger
radovanradic 2e34afd
Support embedded retrieval using criteria
radovanradic 7bc3c4a
Fix azure-cosmos operations bean creation
radovanradic d81d759
Apply suggestions from code review
radovanradic ad31ccf
Revert non needed change.
radovanradic 1e8da8a
Address CR
radovanradic c058b77
Align processor-side embeddable DataType guard with runtime-side logi…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
48 changes: 48 additions & 0 deletions
48
data-jdbc/src/test/java/io/micronaut/data/jdbc/h2/H2VehicleRepository.java
This file contains hidden or 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,48 @@ | ||
| /* | ||
| * Copyright 2017-2026 original authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package io.micronaut.data.jdbc.h2; | ||
|
|
||
| import io.micronaut.data.jdbc.annotation.JdbcRepository; | ||
| import io.micronaut.data.model.query.builder.sql.Dialect; | ||
| import io.micronaut.data.repository.CrudRepository; | ||
| import io.micronaut.data.repository.jpa.JpaSpecificationExecutor; | ||
| import io.micronaut.data.repository.jpa.criteria.CriteriaQueryBuilder; | ||
| import io.micronaut.data.tck.entities.Jurisdiction; | ||
| import io.micronaut.data.tck.entities.Registration; | ||
| import io.micronaut.data.tck.entities.Vehicle; | ||
|
|
||
| @JdbcRepository(dialect = Dialect.H2) | ||
| public interface H2VehicleRepository extends CrudRepository<Vehicle, Long>, JpaSpecificationExecutor<Vehicle> { | ||
|
|
||
| Registration findFirstRegistrationById(Long id); | ||
|
|
||
| Registration findSecondRegistrationById(Long id); | ||
|
|
||
| Jurisdiction findFirstRegistrationJurisdictionById(Long id); | ||
|
|
||
| Jurisdiction findSecondRegistrationJurisdictionById(Long id); | ||
|
|
||
| class Specifications { | ||
| static CriteriaQueryBuilder<Registration> findFirstRegistrationById(Long id) { | ||
| return criteriaBuilder -> { | ||
| var query = criteriaBuilder.createQuery(Registration.class); | ||
| var root = query.from(Vehicle.class); | ||
| query.select(root.get("firstRegistration")).where(criteriaBuilder.equal(root.get("id"), id)); | ||
| return query; | ||
| }; | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.