• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Multiple Column Join

 
Ranch Hand
Posts: 120
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?



 
Ranch Hand
Posts: 344
Oracle Java Linux
  • 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: 120
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: 120
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?
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • 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...
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic