I have a problem by mapping these two tables
i want the keys that are mapped not to be generated...
but to be entered manually ..
I am new to JPA and trying some examples ...
Can someone help ???
Create a row with isbn xx
and insert by that isbn 1-2-3 Instances with data by that isbn
the problem is i get the exception :
Exception in thread "main" org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: jpa.beans.BookInfo.bookInfo in jpa.beans.Book.bookInfo
I would start by removing the "mappedBy" annotation from the getBookInfo method. You shouldn't need any additional annotations for this relationship
This annotation is typically used to map the reverse side of a relationship that has already been captured in another class.
A side note: you may find that it's easier to put the attribute annotations above each attribute declaration. I didn't see anything in your code that would necessitate using the annotations at the method level.