• Post Reply Bookmark Topic Watch Topic
  • New Topic

AnnotationException: : wrong number of column

 
Frank VanOor
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

the following exception happens during hibernate initialisation:

Initial SessionFactory creation failed.org.hibernate.AnnotationException: A Foreign key refering com.stockdomain.domain.Future from com.stockdomain.domain.BrokerRealTimeFuture has the wrong number of column. should be 2


What could the reason that hibernate says that the number of columns should be 2 ? The Primary key in table "Future" is id, so only one column.







Part of pom.xml :

 
Frank VanOor
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found the reeason. The class BaseEntity also has a column id, so there was a duplcation.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!