we have two table one is employee table with column employee_id, firstname, lastname, designation and other table is Addree table with address_id(pk),pincode,state,country,Address_category, employee_id(fk). The question is retrieve employee permanent address by using Hibernate criteria with the firstname condition Hint : Address_category column putted for permanet value or office or other... SQL Query Like : select * from employee_table et, Addree_table at where et.employee_id == at.employee_id and et.firstname = 'somename' and at.Address_category='pemanent';
Nice explanation .It helped to my interivew got cleared many doubts .Thanks a lotttttttttttttttttt sir.Still am expecting more jave related interview questions like this .Please upload if possible.Thanks
Thank you sir , Good Explanation . If possible please provide video on hibernate3 vs hibernate4 differences with detailed explanation. And also Provide video on session interface methods like (save vs saveOrUpdate vs Update, save vs persist)differences with real time scenarios.
Hi Ramesh, I uploaded video for First Level Cache in Hibernate with example. Here is the URL - ruclips.net/video/55mws2zSfyg/видео.html Please stay tuned for more updates.
The one difference between get() and load() is how they indicate that the instance could not be found. If no row with the given identifier value exists in the database, get() returns null. The load() method throws an ObjectNotFoundException. It’s your choice what error-handling you prefer. More important, the load() method may return a proxy, a placeholder, without hitting the database. A consequence of this is that you may get an ObjectNotFoundException later, as soon as you try to access the returned placeholder and force its initialization. The load() method always tries to return a proxy, and only returns an initialised object instance if it’s already managed by the current persistence context. In the example shown earlier, no database hit occurs at all! The get() method on the other hand never returns a proxy, it always hits the database. You may ask why this option is useful-after all, you retrieve an object to access it. It’s common to obtain a persistent instance to assign it as a reference to another instance. For example, imagine that you need the item only for a single purpose: to set an association with a Comment: a Comment.setForAuction(item). If this is all you plan to do with the item, a proxy will do fine; there is no need to hit the database. In other words, when the Comment is saved, you need the foreign key value of an item inserted into the COMMENT table. The proxy of an Item provides just that: an identifier value wrapped in a placeholder that looks like the real thing.
amazing video sir
your explanation is good,,,,, plz post on many to one ,one to many concepts(inheritance concepts)
we have two table one is employee table with column employee_id, firstname, lastname, designation and other table is Addree table with
address_id(pk),pincode,state,country,Address_category, employee_id(fk).
The question is retrieve employee permanent address by using Hibernate criteria with the firstname condition
Hint : Address_category column putted for permanet value or office or other...
SQL Query Like : select * from employee_table et, Addree_table at where et.employee_id == at.employee_id and et.firstname = 'somename' and at.Address_category='pemanent';
Very good understanding i got after seeing this video. Thanks Siva:)
Thanks Vinodh for liking the video. Please do refer our channel to your friends circle as it might be helpful for them. Happy Learning.
@@SivaReddyJavaTechie i already have started to share your channel to my friends circle. Pls post a video on spring in detail
2 years of being uploaded, still helping guys like me , thumbs up
Thanks Shubam. Please refer our RUclips channel to your friends circle as it might be helpful for them. Happy Learning.
Super content !!!
Great one Sir, saved a lot of time while brushing up. 29:20 I believe you want to mention composite objects not the parent-child classes.
Nice explanation .It helped to my interivew got cleared many doubts .Thanks a lotttttttttttttttttt sir.Still am expecting more jave related interview questions like this .Please upload if possible.Thanks
Simple to understand. Can you plz provide the PDF of these questions. It will be more helpful.
Thank you sir , Good Explanation . If possible please provide video on hibernate3 vs hibernate4 differences with detailed explanation.
And also Provide video on session interface methods like (save vs saveOrUpdate vs Update, save vs persist)differences with real time scenarios.
I know I am kinda off topic but do anybody know a good website to stream newly released series online ?
Nice Explanation Sir...
Thanks Sainath.
sir please add more interview questions for 5+ years exp java developer for spring and webservices(Rest)
good one for revision of concept
Thanks Ranjana Yadav
thank you much,I learned more.
Thanks Mahesh
sir i have one question ---> when we use idbc and when we use hibernate?
Helped to the great Extent Thanks
Hi, Sir can you please upload the video of Spring Interview questions and answers
thanks reddy superb explantions
Thanks Raghvulu. I'm glad that you liked the videos.
Good video. Thanks Siva.
Thanks Asha.
Awesome video Sir Ji
Thanks Robinhood. Please refer our RUclips channel to your friends circle as it might be helpful for them. Happy Learning.
Hi sir, could you please explain me how checked exceptions are converted into unchecked in detail?
Good job
Thanks Mubeen.
Hello Sir, can you explain optimistic and pesimistic locking in hibernate
Thank you.
Thanks Sunil. Please refer our RUclips channel to your friends circle as it might be helpful for them. Happy Learning.
could you please explain different usecases if two sessions update same object.
Thanks...
sir, please make videos on RELATIONSHIP'S
Sir, plz explain more on caching(with example)& hibernate inheritance mapping
Hi Ramesh,
I uploaded video for First Level Cache in Hibernate with example. Here is the URL - ruclips.net/video/55mws2zSfyg/видео.html
Please stay tuned for more updates.
Very basic hibernate explanation given not sufficient for experienced developers. No context on Mapping, Cascade, Transaction Management etc.
vedio very nice, but below toppic is missing one to one mapping , 1 to many , many to 1 , many to many ????????
When does hibernate-cfg.xml file loads??
On Server start, it loads hibernate-cfg.xml file and create SessionFactory for hibernate.
Java Hibernate Interview Top 50 Q&A for Success
ruclips.net/video/mCP5Ole-mzk/видео.html
Can u please explain more examples for caching and
hibernate mappings
Hi Swapna - I will upload the videos on requested topics soon. Please stay tuned.
in which case we need to use load() method, and load() method is lazy loading then what is its benefits
The one difference between get() and load() is how they indicate that the instance could not be found. If no row with the given identifier value exists in the database, get() returns null. The load() method throws an ObjectNotFoundException. It’s your choice what error-handling you prefer.
More important, the load() method may return a proxy, a placeholder, without hitting the database. A consequence of this is that you may get an ObjectNotFoundException later, as soon as you try to access the returned placeholder and force its initialization. The load() method always tries to return a proxy, and only returns an initialised object instance if it’s already managed by the current persistence context. In the example shown earlier, no database hit occurs at all! The get() method on the other hand never returns a proxy, it always hits the database.
You may ask why this option is useful-after all, you retrieve an object to access it. It’s common to obtain a persistent instance to assign it as a reference to another instance. For example, imagine that you need the item only for a single purpose: to set an association with a Comment: a Comment.setForAuction(item). If this is all you plan to do with the item, a proxy will do fine; there is no need to hit the database. In other words, when the Comment is saved, you need the foreign key value of an item inserted into the COMMENT table. The proxy of an Item provides just that: an identifier value wrapped in a placeholder that looks like the real thing.
Thank you soooo much Sir☺☺
Thanku sir
Thanks Manish. Please refer our RUclips channel to your friends circle as it might be helpful for them. Happy Learning.
Coding part is not visible :(
could you provide the document that you are ussing in video :)
You can download the document @ github.com/sivajavatechie/DemoDocuments/blob/master/Java%20Docs/HibernateQ%26A.pdf
Sir can you upload spring interview questions and answers
Hi Sudarshan, you can find the spring interview Q & A @ ruclips.net/video/OH8SiLXiONk/видео.html
Mapping in hibernate