After seeing your table relation diagram. Your database designing is wrong.
One student can enroll for more than 1 course. And 1 course can contain more than 1 students.
So basically its a many-many mapping.
Here are some examples for you to achieve it.
UPDATE
I was improvising your design the correct way. But if you still insist that its 0ne-one mapping, then here is a similar question with answer. You will require id's to be exact so that it corresponds to one record only. Have look at hibernate-doc for the same.