• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with @ManyToOne on a CompositeId  RSS feed

Sergio Silva
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!