Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

newbie hibernate question for an existing system schema change

 
Laura Ferguson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HELP: We've added 4 new columns to an Oracle database. I've updated all of the references to the table I can find in the existing Java code, annotations and xml files. However, the hibernate generated sql code ignores these columns when a new record is added and only updates the pre-existing columns. What do I need to do to get hibernate to recognize the new columns? Is there a tool/task I need to run?

I'm using Intellij Idea, maven, hibernate, spring, Java 1.6 and an oracle db. I am new to web development as well as hibernate, so please spell it out for me. (Ack! I've been doing desktop application development since some time in the last century.)

Laura
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the only things that are required for Hibernate to recognize the added columns are:
1. Update the .hbm.xml and the POJO files for the Table.
2. Build the application and restart the server.

That should do...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic