Hibernate Tutorial 16 - CascadeTypes and Other Things

  Рет қаралды 221,370

Java Brains

Java Brains

Күн бұрын

Пікірлер: 34
@davidjohnson786
@davidjohnson786 3 жыл бұрын
Its difficult to leave a comment as words don't really express how brilliant your site Java Brains is .... This is the place to learn all things Java using 21st century learning techniques ...Thank you
@dhanyapp
@dhanyapp 12 жыл бұрын
All the series of tutorials on Hibernate is informative and presented in a very good manner. Thank you for sharing the same!
@dhritimanpandit2730
@dhritimanpandit2730 3 жыл бұрын
Thanks man, this video really helped clear my doubts
@StefanFalk
@StefanFalk 9 жыл бұрын
You deserve a lot more up votes!
@sundaramjesudasan
@sundaramjesudasan 10 жыл бұрын
I've been looking for Notfound annotation. I have handled like, ObjectNotFoundException in my catch block. This is cool. I'm gonna try this today. Thank you for your effort.
@hyperborean72
@hyperborean72 9 жыл бұрын
Dear Koushik, will you please answer my two questions? 1. Do we need to remove @ManyToOne to Cascade to work? 2. did I understand correct that if Vehicle is a ValueObject then saving its instances to collection on One-side saves them as well (no cascading needed in that case)? Thank you
@danishrockz1
@danishrockz1 3 жыл бұрын
cascading should be done on inverse side ( Parent entity ).. If u would remove @ManyToOne thn there will be no relationship at all.. hence it's needed.. second point I agree
@harshadkalantri19
@harshadkalantri19 3 жыл бұрын
Got this error - object references an unsaved transient instance - save the transient instance before flushing. Can you tell me how to resolve ?
@siraj3676
@siraj3676 12 жыл бұрын
Hi Koushik, Awesome explanation. I have one query. Why don't you using a mapping file?? Which one is preferred? plz let me know. Thank you
@anasheko2432
@anasheko2432 7 жыл бұрын
@NotFound(action = NotFoundAction.IGNORE) is not working with me??
@LeBadman
@LeBadman 9 жыл бұрын
Why would a CRUD operation on UserDetails affect all the Vehicles?.. I don't understand this. Does someone know, please?
@vinaykumar-no2zh
@vinaykumar-no2zh 2 жыл бұрын
You can mention not-null="false"
@nehaagrawal30
@nehaagrawal30 11 жыл бұрын
Hi Koushik, Thanks for this tutorial. I don't get an exception even if I don't use @NotFound. what am I missing?
@andrei-un3yr
@andrei-un3yr 4 жыл бұрын
I'm not getting an exception when using @NotFound(action = NotFoundAction.EXCEPTION) or by not setting it at all. I instead get null. Does anyone know why?
@vimalalwaysrocks
@vimalalwaysrocks 11 жыл бұрын
Koushks, What book? do you use for Hibernate?
@nikitaparab1483
@nikitaparab1483 7 жыл бұрын
What exception is thrown if we dont write @NotFound ?
@reachmanav
@reachmanav 6 жыл бұрын
Mine did not throw any exception, but just "Null", so not sure either
@divinity5250
@divinity5250 2 жыл бұрын
06:00 mins: cascades starts
@barry_allen558
@barry_allen558 12 жыл бұрын
What is the exact difference between session.persist() and session.save()????????
@quincyfinnley2653
@quincyfinnley2653 3 жыл бұрын
pro trick : you can watch series at flixzone. Me and my gf have been using them for watching loads of movies during the lockdown.
@tuckeraxton9064
@tuckeraxton9064 3 жыл бұрын
@Quincy Finnley Definitely, been watching on flixzone for since november myself :D
@lockstockandbarrel3345
@lockstockandbarrel3345 7 жыл бұрын
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException i m stuck to it .can u please elaborate it sir.
@emorshall
@emorshall 8 жыл бұрын
my foreign key in child table gets a null value. please help me.
@simeonmarkov94
@simeonmarkov94 8 жыл бұрын
I had the same concern. Apparently cascading cares only about creating the child table and filling its basic data and not its foreign keys automatically.That means if User is cascade, all entity objects attached to him are just being created without their foreign key to that User being populated. You can just call the setter of the child object and set its User( e.g. not only user.getVehicleList().add(vehicle), but vehicle.setUser(user) as well). The point of the cascade was just to save all attached to some parent object child objects without explicitly bothering the session to do that. I hope I could help at least a bit!
@reachmanav
@reachmanav 6 жыл бұрын
I encountered the same problem. Apparently, you'll still need to set the user of the vehicle using setter commands.
@maxfeldman6654
@maxfeldman6654 3 жыл бұрын
Any one knows if this series of tutorial's still relevant for 2021?
@tgroy1
@tgroy1 3 жыл бұрын
Yes it is still relevant in 2021.
@whyisitsocomplicated2462
@whyisitsocomplicated2462 3 жыл бұрын
Thanks
@Betrayed227
@Betrayed227 11 жыл бұрын
do note this only works if you import javax.persistance.CascadeType; If you use import org.hibernate.CascadeType It will probably not work. I had this issue.
@dinh_kien8
@dinh_kien8 13 жыл бұрын
very good!, thanks so much! I am from Việt Nam :)
@AaronEzekiel752
@AaronEzekiel752 4 жыл бұрын
so do i
@surajankita1
@surajankita1 6 жыл бұрын
give example of cascadetype refresh,detach and merge
Hibernate Tutorial 17 - Implementing Inheritance
14:59
Java Brains
Рет қаралды 191 М.
Hibernate Tutorial 13 - One To One Mapping
12:52
Java Brains
Рет қаралды 307 М.
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
«Жат бауыр» телехикаясы І 26-бөлім
52:18
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 434 М.
#12 Hibernate Tutorial | Mapping Relations Theory
13:14
Telusko
Рет қаралды 313 М.
Hibernate Tutorial 14 - One To Many Mapping
13:18
Java Brains
Рет қаралды 314 М.
Hibernate Tutorial | Full Course
3:19:40
Telusko
Рет қаралды 1,3 МЛН
Hibernate Tutorial 21 - CRUD Operations
15:18
Java Brains
Рет қаралды 173 М.
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН