Changeset 5386


Ignore:
Timestamp:
Aug 13, 2010, 3:00:23 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #1482: Update to Hibernate 3.5.2

Installation program now detect problems with database generation and exits immediately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/HibernateUtil.java

    r5384 r5386  
    518518    try
    519519    {
     520      List exceptions;
    520521      if (update)
    521522      {
     
    532533        // Note! This doesn't create indexes correctly. Use dbIndexes method.
    533534        SchemaUpdate se = new SchemaUpdate(cfg);
     535        se.setHaltOnError(true);
    534536        se.execute(false, true);
     537        exceptions = se.getExceptions();
    535538      }
    536539      else
    537540      {
    538541        SchemaExport se = new SchemaExport(cfg);
     542        se.setHaltOnError(true);
    539543        se.execute(false, true, false, true);
     544        exceptions = se.getExceptions();
     545      }
     546      if (exceptions != null && exceptions.size() > 0)
     547      {
     548        throw new BaseException((Throwable)exceptions.get(0));
    540549      }
    541550    }
Note: See TracChangeset for help on using the changeset viewer.