-
Notifications
You must be signed in to change notification settings - Fork 38.5k
In AnnotationSessionFactoryBean, be able to specify annotatedPackages and packagesToScan in one property [SPR-10288] #14922
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
Comments
Juergen Hoeller commented As of 3.2.2, "packagesToScan" detects package-info classes as well and passes them to Hibernate's addPackage method. This means that specifying "packagesToScan" should be sufficient for your use case now. Juergen |
Sanjay Deshmukh commented Beautiful - thank you! |
Yannick Lazzari commented Hi, Are there any plans to bring the same functionality to the org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean class which also has the packagesToScan property but doesn't offer the same flexibility (I just looked in version 3.2.4)? Unless there's another way to achieve the same behavior that I'm not aware of. Thanks. |
Peter Cooper Jr. commented See also #13233 |
Juergen Hoeller commented Yannick, related to my comment on #13233: Check out #15538 for JPA support there, scheduled for Spring Framework 4.1 at this point. Juergen |
Yannick Lazzari commented Thank you. I'll be watching that issue then. It will be very useful for testing. When you have a big system with hundreds of entities, it's nice to have a separate config to bootstrap your entity manager with only a subset of entities (using the packagesToScan property). Makes for faster startup times of test cases that only need to deal with a specific part of the system. The problem is that I have |
Sanjay Deshmukh opened SPR-10288 and commented
I tend to have package-level annotations on all of my packages that contain Hibernate-annotated classes. The biggest one is a
@TypeDef
to persist joda-time DateTimes and LocalTimes. It would be nice to have a single property through which I can set both annotatedPackages and packagesToScan, rather than passing the same list to both.Affects: 3.2.1
Attachments:
Issue Links:
Referenced from: commits 5334ac5
The text was updated successfully, but these errors were encountered: