Results 1 to 2 of 2
  1. #1
    sandeepind is offline Member
    Join Date
    Aug 2012
    Posts
    1
    Rep Power
    0

    Default How to update database scheema with Hibernate Annotations ?

    Hi All,

    As of now i am using hibernate.hbm2ddl.auto = update property with .hbm file to update my database scheema. Please let me know if there is any procedure to update db scheema with out .hbm file(i mean with annotations)
    Thanks in advance.

  2. #2
    zael is offline Member
    Join Date
    Jan 2013
    Location
    Berlin
    Posts
    4
    Rep Power
    0

    Default Re: How to update database scheema with Hibernate Annotations ?

    You can add them to the SessionFactory... eiter by spring context(If you use spring) or by code

    Configuration cfg = new Configuration().setProperty("hibernate.hbm2ddl.aut o", "update");

    Chapter*3.*Configuration

Similar Threads

  1. update database
    By manuzerwa in forum New To Java
    Replies: 4
    Last Post: 04-01-2012, 01:35 AM
  2. Update table in database
    By CTheSky in forum JDBC
    Replies: 3
    Last Post: 01-30-2011, 05:18 AM
  3. Update a price in a database
    By sandraW in forum New To Java
    Replies: 14
    Last Post: 08-29-2010, 05:41 AM
  4. Hibernate update function
    By ananddevaraj in forum Web Frameworks
    Replies: 1
    Last Post: 06-30-2010, 02:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •