From the output it seems my test (and assume the same in the app) is not refreshing the parent since the new values are not yet committed to the database. which makes sense even to this newbie.
The problem in the app (Spring MVC) is calling the controller method to refresh the screen post-save does not refresh unless the user explicitly clicks ‘Search’ again. But this may be an issue with my Spring app, not Hibernate.
GET PARENT
select
gpoprintbu0_.BUDGET_ID as budget_id1_4_0_,
gpoprintbu0_.CREATED_BY as created_by2_4_0_,
gpoprintbu0_.DATE_CREATED as date_created3_4_0_,
gpoprintbu0_.DATE_MODIFIED as date_modified4_4_0_,
gpoprintbu0_.TERRITORY_ID as territory_id12_4_0_,
gpoprintbu0_.TITLE_ID as title_id13_4_0_,
gpoprintbu0_.IMAX_BUDGET as imax_budget5_4_0_,
gpoprintbu0_.MODIFIED_BY as modified_by6_4_0_,
gpoprintbu0_.MPM_TITLE_ID as mpm_title_id7_4_0_,
gpoprintbu0_.OPTLOCKID as optlockid8_4_0_,
gpoprintbu0_.RELEASE_DATE as release_date9_4_0_,
gpoprintbu0_.SAP_TERRITORY_ID as sap_territory_id10_4_0_,
gpoprintbu0_.SCREENS_BUDGET as screens_budget11_4_0_,
(SELECT
count(*)
FROM
GPO_PRINT_ORDER orders
WHERE
orders.budget_id = gpoprintbu0_.budget_id) as formula1_0_,
(SELECT
NVL(SUM(orders.NUMBER_OF_HARD_DRIVES),
0)
FROM
GPO_PRINT_ORDER orders
WHERE
orders.budget_id = gpoprintbu0_.budget_id) as formula2_0_,
(SELECT
NVL(SUM(orders.NUMBER_ORDERED),
0)
FROM
GPO_PRINT_ORDER orders,
GPO_VERSION version
WHERE
orders.budget_id = gpoprintbu0_.budget_id
AND orders.version_id = version.version_id
AND version.format NOT IN (
‘SAT’,‘ASPERA’,‘S_IMAX’,‘A_IMAX’
)) as formula3_0_,
(SELECT
NVL(SUM(orders.NUMBER_ORDERED),
0)
FROM
GPO_PRINT_ORDER orders,
GPO_VERSION version
WHERE
orders.budget_id = gpoprintbu0_.budget_id
AND orders.version_id = version.version_id
AND version.format IN (
‘SAT’,‘S_IMAX’
)) as formula4_0_
from
GPO_PRINT_BUDGET gpoprintbu0_
where
gpoprintbu0_.BUDGET_ID=?
VALUES:
ID: 14115
Formula 17
Formula 43
Formula 55
GET CHLDREN collection
select
gpoprintor0_.BUDGET_ID as budget_id14_5_0_,
gpoprintor0_.ORDER_ID as order_id1_5_0_,
gpoprintor0_.ORDER_ID as order_id1_5_1_,
gpoprintor0_.CREATED_BY as created_by2_5_1_,
gpoprintor0_.DATE_CREATED as date_created3_5_1_,
gpoprintor0_.DATE_MODIFIED as date_modified4_5_1_,
gpoprintor0_.DELIVERY_DATE_REQUIRED as delivery_date_requ5_5_1_,
gpoprintor0_.BUDGET_ID as budget_id14_5_1_,
gpoprintor0_.TERRITORY_ID as territory_id15_5_1_,
gpoprintor0_.TITLE_ID as title_id16_5_1_,
gpoprintor0_.VERSION_ID as version_id17_5_1_,
gpoprintor0_.MODIFIED_BY as modified_by6_5_1_,
gpoprintor0_.NOTES as notes7_5_1_,
gpoprintor0_.NUMBER_BUDGETED as number_budgeted8_5_1_,
gpoprintor0_.NUMBER_OF_HARD_DRIVES as number_of_hard_dri9_5_1_,
gpoprintor0_.NUMBER_ORDERED as number_ordered10_5_1_,
gpoprintor0_.OPTLOCKID as optlockid11_5_1_,
gpoprintor0_.ORDER_COMPLETED as order_completed12_5_1_,
gpoprintor0_.ORDER_DATE_REQUIRED as order_date_requir13_5_1_,
(SELECT
version.description||gpoprintor0_.order_id
FROM
GPO_VERSION version
WHERE
version.version_id = gpoprintor0_.version_id ) as formula5_1_
from
GPO_PRINT_ORDER gpoprintor0_
where
gpoprintor0_.BUDGET_ID=?
order by
(SELECT
version.description||gpoprintor0_.order_id
FROM
GPO_VERSION version
WHERE
version.version_id = gpoprintor0_.version_id ) asc nulls last
-
update order -
-
update order -
-
update order -
-
update budget -
-
refresh budget -
GET PARENT
select
gpoprintbu0_.BUDGET_ID as budget_id1_4_0_,
gpoprintbu0_.CREATED_BY as created_by2_4_0_,
gpoprintbu0_.DATE_CREATED as date_created3_4_0_,
gpoprintbu0_.DATE_MODIFIED as date_modified4_4_0_,
gpoprintbu0_.TERRITORY_ID as territory_id12_4_0_,
gpoprintbu0_.TITLE_ID as title_id13_4_0_,
gpoprintbu0_.IMAX_BUDGET as imax_budget5_4_0_,
gpoprintbu0_.MODIFIED_BY as modified_by6_4_0_,
gpoprintbu0_.MPM_TITLE_ID as mpm_title_id7_4_0_,
gpoprintbu0_.OPTLOCKID as optlockid8_4_0_,
gpoprintbu0_.RELEASE_DATE as release_date9_4_0_,
gpoprintbu0_.SAP_TERRITORY_ID as sap_territory_id10_4_0_,
gpoprintbu0_.SCREENS_BUDGET as screens_budget11_4_0_,
(SELECT
count(*)
FROM
GPO_PRINT_ORDER orders
WHERE
orders.budget_id = gpoprintbu0_.budget_id) as formula1_0_,
(SELECT
NVL(SUM(orders.NUMBER_OF_HARD_DRIVES),
0)
FROM
GPO_PRINT_ORDER orders
WHERE
orders.budget_id = gpoprintbu0_.budget_id) as formula2_0_,
(SELECT
NVL(SUM(orders.NUMBER_ORDERED),
0)
FROM
GPO_PRINT_ORDER orders,
GPO_VERSION version
WHERE
orders.budget_id = gpoprintbu0_.budget_id
AND orders.version_id = version.version_id
AND version.format NOT IN (
'SAT','ASPERA','S_IMAX','A_IMAX'
)) as formula3_0_,
(SELECT
NVL(SUM(orders.NUMBER_ORDERED),
0)
FROM
GPO_PRINT_ORDER orders,
GPO_VERSION version
WHERE
orders.budget_id = gpoprintbu0_.budget_id
AND orders.version_id = version.version_id
AND version.format IN (
'SAT','S_IMAX'
)) as formula4_0_
from
GPO_PRINT_BUDGET gpoprintbu0_
where
gpoprintbu0_.BUDGET_ID=?
SAME VALUES ?
** 14115
** 17
** 43
** 55
COMMIT (3 children)
update
GPO_PRINT_ORDER
set
NUMBER_ORDERED=?,
OPTLOCKID=?
where
ORDER_ID=?
and OPTLOCKID=?
Hibernate:
update
GPO_PRINT_ORDER
set
NUMBER_ORDERED=?,
OPTLOCKID=?
where
ORDER_ID=?
and OPTLOCKID=?
Hibernate:
update
GPO_PRINT_ORDER
set
NUMBER_ORDERED=?,
OPTLOCKID=?
where
ORDER_ID=?
and OPTLOCKID=?