-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enhance reference documentation and cover MongoManagedTypes #4365
Comments
Thanks for pointing out the blank spot in the reference documentation. As per the Javadoc of the
Basically its the initial entity set now exposed as a dedicated type which helps detect them during a potential AOT phase to run inspections required when building a GraalVM native-image. |
Yes, I found the commit where the change was done: java/org/springframework/data/mongodb/config/MongoConfigurationSupport.java |
Before it was mappingContext.setInitialEntitySet(getInitialEntitySet()); and now it is mappingContext.setManagedTypes(managedTypes); |
How can I set them? |
Can you share a complete minimal sample (something that we can unzip or git clone, build, and deploy) that shows what you're trying to achieve. I seem to lack some context form the linked SO question and the error posted there. |
The attached image shows the problem - in spring-data-mongodb 4.0 the method getMappingBasePackages() which is defined with @ Override is not called anymore: https://ibb.co/ZdChJbQ Edit: |
Why do you think |
I know getMappingBasePackages is no longer called! I see it when debugging. The default implementation of getMappingBasePackage is called instead. And that is the reason for the error. A minimal sample would just be any implementation that overrides getMappingBasePackage. public class FooBarMongoConfig extends AbstractFooBarMongoConfig { public abstract class AbstractFooBarMongoConfig extends AbstractReactiveMongoConfiguration { |
Then providing the sample should not be an issue. |
MongoManagedTypes are not mentioned in the v 4.0 release even though they where released in that version. They are needed when overriding mongoMappingContext(MongoCustomConversions customConversions, MongoManagedTypes types) which are needed for custom converters. Can you update java-doc and give an example where there is 2 or more customConverters?
The text was updated successfully, but these errors were encountered: