Forums Register Login

Problem with @ManyToOne on a CompositeId

+Pie Number of slices to send: Send
I have a Database that i need to persist and that i can't change his structure.

With reverse engineering i created the persistence model, but now i have a problem.

I have the following class:




And the class:
APK



The OperationInterval class:



When i validate the model, it gives the error:

org.hibernate.AnnotationException: Column name operationintervalid of com.....entity.A not found in JoinColumns.referencedColumnName

So... I commented the joincolumn anotation... and the result is:

org.hibernate.HibernateException: Missing column: operationintervalsByOperationintervalid_operationIntervalId in TheAtable



How can i solve this problem ? I can't change th
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 659 times.
Similar Threads
Primary key / Forign Key
Unable to save data into child table
"Mapping RelationShip State" in chapter 8
Problem with @ManyToOne on a CompositeId
Repeated column in mapping for entity
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:20:09.