I had the same error. The problem was I had imported org.hibernate.annotations.CascadeType instead of javax.persistence.CascadeType. Changing the imports solved my problem :)
@DillonHaw send me an email with both class files and the test class. I will take a look. Also I assume the annotation is from javax and not from hibernate.
@DillonHaw recheck your declaration of person in the PersonDetail class. make sure you have the getter and setter. Its at 1:10 time line in the video.
First, thanks for your fantastic work. I was a error in a example OneToOne Bidirectional
org.hibernate.AnnotationException: Unknown mappedBy in:
professorxpto 2 weeks ago in playlist Mais vídeos de patrickwashingtondc
I had the same error. The problem was I had imported org.hibernate.annotations.CascadeType instead of javax.persistence.CascadeType. Changing the imports solved my problem :)
qpilas 4 months ago
Thank you very much for the tutorials. In this chapter, I am getting the following error on this line in the PersonDetail class.
@OneToOne(mappedBy="pDetail",cascade=CascadeType.ALL,fetch=FetchType.EAGER)
Error is : Type Mismatch: cannot convert from CascadeType to CascadeType[]
abhisruti 8 months ago
I am getting the following error sir. Can you please let me know?
nikhidas23 9 months ago
at com.hibernate.chapter6.TestOneToOnePerson.main(TestOneToOnePerson.java:15)
nikhidas23 9 months ago
One of the Highest in quality Hibernate Tutorial
TheYogeshutube 10 months ago
your tutorial series is one of the best tutorial, i found on you tube.
god bless you...thanks a lot
pravinkit1 11 months ago
@DillonHaw send me an email with both class files and the test class. I will take a look. Also I assume the annotation is from javax and not from hibernate.
patrickwashingtondc 1 year ago
@patrickwashingtondc I did, but i still got the same error.
i have : private Person person; @OneToOne (mappedBy="pDetail", cascade= CascadeType.ALL) public Person getPerson() { return person; }
and also the setPerson method
DillonHaw 1 year ago
@DillonHaw recheck your declaration of person in the PersonDetail class. make sure you have the getter and setter. Its at 1:10 time line in the video.
patrickwashingtondc 1 year ago