-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Missing native hints for Hibernate Native Query proxy #29603
Comments
Can you please attach the full stack trace? |
|
Thanks a lot. This looks like a Spring Framework core issue as the proxy is being generated by |
@mp911de you're welcome, thank you for your time and work, it's a great improvement |
@mp911de, can you help me please to be working? I added this hint, but that is still not working. hints.reflection().registerType(NativeQueryImplementor.class, MemberCategory.values());
hints.reflection().registerType(DomainQueryExecutionContext.class, MemberCategory.values());
hints.reflection().registerType(ResultSetMappingResolutionContext.class, MemberCategory.values());
hints.reflection().registerType(QueryImplementor.class, MemberCategory.values());
hints.reflection().registerType(SelectionQuery.class, MemberCategory.values());
hints.reflection().registerType(CommonQueryContract.class, MemberCategory.values());
hints.reflection().registerType(NativeQueryImpl.class, MemberCategory.values());
hints.reflection().registerType(SharedEntityManagerCreator.class,MemberCategory.values()); |
+1 for this, I am facing the same problem, the only difference is that I am not using native query.
The error is thrown by: @Bean
CommandLineRunner commandLineRunner(UserRepository userRepository) {
return args -> {
userRepository.save(new User("[email protected]"));
Optional<User> user = userRepository.findByEmail("[email protected]"); // here
user.ifPresent(System.out::println);
};
} The reproducible sample is here https://github.com/marcusdacoregio/query-hibernate-proxy-native-bug |
@marcusdacoregio Your error is likely related to #31050 on should be fixed on latest snapshots. |
* gh-188: Add a reproducer for spring-projects/spring-framework#29603 Add a reproducer for spring-projects/spring-framework#31050 Closes gh-188
In Spring Boot 3.0.0, jpa native query not working
with this error
The text was updated successfully, but these errors were encountered: