galovics commented on code in PR #2685:
URL: https://github.com/apache/fineract/pull/2685#discussion_r999437539
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/JPAConfig.java:
##########
@@ -70,29 +77,48 @@ public JPAConfig(RoutingDataSource dataSource,
JpaProperties properties, ObjectP
@DependsOn("tenantDatabaseUpgradeService")
public LocalContainerEntityManagerFactoryBean
entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder) {
Map<String, Object> vendorProperties = getVendorProperties();
- customizeVendorProperties(vendorProperties);
- return
factoryBuilder.dataSource(getDataSource()).properties(vendorProperties).persistenceUnit("jpa-pu")
- .packages("org.apache.fineract").jta(false).build();
+ String[] packagesToScan = getPackagesToScan();
+ return
factoryBuilder.dataSource(getDataSource()).properties(vendorProperties).persistenceUnit("jpa-pu").packages(packagesToScan)
Review Comment:
Not necessarily. If you look at the JpaBaseConfiguration class - provided by
Spring - they do programmatic resolution of necessary packages. I can imagine a
similar situation where you have some logic to figure out which packages are
important.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]