• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

JPA : argument exception

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic