Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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

@OneToMany primary key part of foreign key

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a newbe and have a simple @OneToMany relationship to build without using a Join-Table and where the PK of table 1 is part of the PK in table 2

table 1: Exchange , PK: id
table 2: ExchangeRetrievalDate, PK: exchangeId (Pk of Exchange) + date



Hibernate throws the following exception:

Caused by: org.postgresql.util.PSQLException: ERROR: relation "public.exchange_exchangeretrievaldate" does not exist
 
Frank VanOor
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The reason was that the DB column names had mixed uppercase lowercase characters, and hibernate can't cope with that. I changed all column names to lowercase, and all works fine.
 
We can walk to school together. And we can both read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic