Hibernate Tutorial part 8 - One to One Mapping using Annotations

preview_player
Показать описание

This tutorial covers - what is one to one mapping in general and then how is related to hibernate with a detailed demo.
Рекомендации по теме
Комментарии
Автор

I watched almost every tutorial on mapping on youtube, but this is the Best One, now i got complete clarity on OneToOne Mapping, Going to learnall your other videos, Keep doing this great work..thanks alot...

Автор

Thank you so much for these tutorials!! since I have found them I now understand hibernate, keep them coming!!!

gaines
Автор

Nice tutorials with good examples & clear voice quality.You are taking good efforts to make beginners understand the concepts clearly. Thanks a lot.

snoisoni
Автор

Great job gontu. i really have learnt a lot from your tutorials. Thanks a million.

jenlesamuel
Автор

Well done, a series that is easy to understand and grasp.

sasmj
Автор

I'm impressed.
I just fixed some mappings where the foreign key/primary key values weren't mapped correctly and wht should have been 30 records turned into 5, 000.

Subscribed and liked.

sbacon
Автор

just awesome sir...I loved your tutorial a lot...keep uploading and keep teaching us..thanku..

kailaskamble
Автор

these videos are really help full to me.

kovelaapp
Автор

Excellent explanation and clear on the concepts

linus
Автор

Thanks for sharing your knowledge, it worked for me, but I had to add the attribute to @GeneratedValue in the Student class, because it was telling that the table hibernate_sequence does not exist. I understand that Mysql does not support sequences. But, I have a question. I've read that in general annotations from Hibernate shouldn't be used, because in this way we are depending on a specific ORM, and instead JPA annotations should be used. Here we are using the annotation @GenericGenerator from Hibernate. Isn't there a way to achieve this just using JPA annotations? Thanks, Valentino

vpezzano
Автор

good tutorial. Would u please elaborate more on onetoone annotation in studentdetail?

solvinny
Автор

I don't quite understand why you made a reference to Student in the StudentDetail class? I would have done it the other way around, making a StudentDetail reference in Student class. Is there any reason why you choose that option?

dotnes
Автор

Can you explain embeddable concepts in hibernate & allocationsize in generator

selvameerap
Автор

Good tutorial.
Be careful, on your website, the link to the next tutorial (part 9) is not present (mixed up with another series).
Thanks for your great work!

memento
Автор

Hi Ankush, your tutorial are are very well explained. I have couple of question shere, why you are creating/mapping relation from DB table perspective?Why not from Java domian object perspective ?In other words you are trying to design java object keepping table in mind. shouldn't it be other way round? I think that is what ORM for.

jsinus
Автор

I have tried the above example, but the second table StudentDetails in the database is empty whereas the first table has the values entered. Where could i've gone wrong.

karthikgolagani
Автор

Wouldn't this be considered a unidirectional relationship? If so, how would one perform a bidirectional relationship?

robhinh
Автор

Hi, I am getting the following error even though I have the same code as yours:
Duplicate entry '0' for key 'PRIMARY'

padminimishra
Автор

Hey Ankush, It's really a great tutorial series, it's really helpful, but I am a newbie and so i have one question too. In "hibernate.cfg.xml" file when i write <property name =, it only saves the primary key in table and not save the other field values, However i am not using @Transient annotation in my code. But when i write <property name = instead, it saves one more field, what is the reason behind this?? And what value is most suitable for N number of fields??? Please guide

MrCliplover
Автор

What about the parent "Student" class? Isn't there an annotation required there?

thecreativemastermin