Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA : argument exception

 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am beginner in JPA and facing this error.

I am trying to map 2 entity beans. When I am accessing child entity in my parent entity , it throws exception saying.... child class declares a column that is not compatible with the expected type "decimal".

If I remove mapping then it does not complain at all.

Can anyone help me understand what could be the issue? I need to map those two entities.


Thanks,
Vivian
 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

I got it solved.

I was not using referencedColumnName attribute for @JoinColumn.

You need to use it if the column you are referring to join the entity is not a primary key for that entity object.

Hope this helps some one facing similar problem.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic