• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About the @CollectionTable in Chapter 5 overrideCollectionTableColumn

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In chapter 5 of JPA Pro 2 (2nd edition),
first we create a table called Employee_Vacation :


CREATE TABLE Employee_VACATION (EMP_ID INTEGER NOT NULL, STARTDATE VARCHAR(255), DAYS_ABS INTEGER);



In the Employee.java provided, it has :




But when I ran it, it complains that table vacation does not exist.

I have to modify the Employee.java like this to make it work :




 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Himai Minh wrote:In chapter 5 of JPA Pro 2 (2nd edition),
first we create a table called Employee_Vacation :


CREATE TABLE Employee_VACATION (EMP_ID INTEGER NOT NULL, STARTDATE VARCHAR(255), DAYS_ABS INTEGER);




Okay...

But when I ran it, it complains that table vacation does not exist.



Well, yeah, that's true. The table isn't named "vacation".
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic