Forums Register Login

not able to retrive updated data from session using session.load + hibernate

+Pie Number of slices to send: Send
why my bellow function does not retrive the updateded data from table at first attempt ? When i second time make same query from ui it gives me the correct data.

i am really not able to understand the reason










As you can see in console
there is only one module for product 11

but when i submited the same form again and called the same method again it gave me 2 module for product 11


Console

+Pie Number of slices to send: Send
Where and when is your update being made?
+Pie Number of slices to send: Send
before i call seachCustomer Method i am updating...

one more thing which i have noteiced is

I have modified my searchCustomer method and its working fine now.

but its not the current way.

i have just begin a treansaction and commited it.


+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
Why are you using a transaction for a search at all?
+Pie Number of slices to send: Send
Yeah true... problem solved. i used session for all querying database...

Thanks a lot.
Oh the stink of it! Smell my tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 922 times.
Similar Threads
Reading All the records from a table + Hibernate
Want to avoid multiple SELECT when using "new" in HQL
Query on JPA Annotation
JOIN syntax for HQL . Need help!
how to set fetch type at runtime ? + Hibernate
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:01:56.