• 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

is it possible to aklter table using hibernate!

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear all i want to develop a web page that adding new columns to table dynamically ,and i use hibernate for communication with DB.is that possible and how please
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. You normally create one table at once and use it forever.
Adding columns dynamically just indicates a flaw in your datamodel.

If you for example want to add a new column every day, then you should rather be using a fixed column denoting the day itself.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by hani Ibrahim:
dear all i want to develop a web page that adding new columns to table dynamically ,and i use hibernate for communication with DB.is that possible and how please



Yes. However, its not a smart thing to do (as Bauke suggests). Hibernate allows you to run SQL, which gives you access to DDL. However, you would need to delete/reconfigure/open your SessionFactory everytime you did this.
reply
    Bookmark Topic Watch Topic
  • New Topic