SmartClient Version: v9.1p_2015-01-02/PowerEdition Development Only (built 2015-01-02)
Hi,
We have some questions about hibernate datasources:
1. We have datasource B with relation many-to-one to datasource A.
Is it true that, if we have 5 records from table A, hibernate will make 50 different sql calls to fetch related records from B table? If yes - is it possible to replace that 50 calls with one combined call without rewriting datasource?
2. The second problem is that sometimes, based on search criteria we need to directly specify name of partitioned table (which is slightly different that base table, eg. messages and messages_2015_02). What is preferred way to achieve this?
3. Is there a possibility to reuse existing persistence unit configuration(defined in persistence.xml file)? If yes, could you provide us with example configuration? And how should configuration look like so that datasource will use transaction provider from application server (wildfly)?
Best regards
Jacek
Hi,
We have some questions about hibernate datasources:
1. We have datasource B with relation many-to-one to datasource A.
Is it true that, if we have 5 records from table A, hibernate will make 50 different sql calls to fetch related records from B table? If yes - is it possible to replace that 50 calls with one combined call without rewriting datasource?
2. The second problem is that sometimes, based on search criteria we need to directly specify name of partitioned table (which is slightly different that base table, eg. messages and messages_2015_02). What is preferred way to achieve this?
3. Is there a possibility to reuse existing persistence unit configuration(defined in persistence.xml file)? If yes, could you provide us with example configuration? And how should configuration look like so that datasource will use transaction provider from application server (wildfly)?
Best regards
Jacek
Comment