• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalArgumentException when calling getter of persisted object ID in Hibernate.

 
Nope Torres
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new here and I have a very simple but tricky question. I have posted it in Stackoverflow and forum of Hibernate:

http://stackoverflow.com/questions/31776602/illegalargumentexception-occurred-calling-getter-of-id-when-doing-cascading-inse

https://forum.hibernate.org/viewtopic.php?f=1&t=1041179

No answers yet.

In short: I get IllegalArgumentException when calling getter of ID of owning part(the many part) of a @OneToMany relation, when I tried to do session.save(owned part object, one part). The cascade type is ALL.

I have also tried to use cascading, but save the many part object directly, to no avail.

I have checked this forum and found a similar post, which is caused by mapping ID of type String of owned part as class property in the owned part, instead of mapping objects type, but I am doing well in this.

Can someone help me? Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic