• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Column Join

 
Michelle Streeter
Ranch Hand
Posts: 87
Eclipse IDE Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have class A, class B, and Class C. B is a child of A and C is a child of B. The classes listed below are the ones created by JPA. But I got an error on the reference from C to B as generated. So then I changed the C class to the second list of C below and it compiled. But when I published to Glassfish, I get an error and JPA didnt like it. Could someone please help here?



 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use code tags for your code. Also, what is the exact error you're getting?
 
Michelle Streeter
Ranch Hand
Posts: 87
Eclipse IDE Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I found the problem with the above scenario just after I posted the question. add , nullable=false, updatable=false to the JoinColmn reference and it worked.
 
Michelle Streeter
Ranch Hand
Posts: 87
Eclipse IDE Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wondering how I unmark this resolved. At first I thought I found the answer but evidently not. The app had both my real code and the ABC example. So when it stopped failing on the ABC, I thought it was resolved but once I changed my real code like the ABC, then new issues came up. So, do I create a new question or do we go on with what I did post?
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michelle Streeter wrote:...So, do I create a new question or do we go on with what I did post?

What's the new issues (with exceptions etc...) you face now?

And make sure to use code tags (UseCodeTags) next time posting code. I've edited this time for you...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic