facebook

Problems when trying to insert a new record using Hibernate

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #247992 Reply

    sorinc
    Member

    Hello!

    I’ve a MySQL database named Reports. This database has departments, users, etc. tables.
    When I try to insert from code a new department using

     
                                    DepartmentsDAO depDAO = new DepartmentsDAO();
            Departments dep = new Departments();
            dep.setDeptName("SAP");
            depDAO.save(dep);
    

    I’ve got the following error:
    10:35:38,250 DEBUG JDBCExceptionReporter:63 – could not insert: [com.forte.hibernate.Departments] [insert into reports__departments (dept_name) values (?)]
    java.sql.SQLException: Table ‘reports.reports__departments’ doesn’t exist

    Does anyone know what can be the problem?

    Thank you very much
    With best regards,
    Sorin N. Ciolofan

    #247999 Reply

    Haris Peco
    Member

    sorinc,

    This bug in hibernate 3.0.5 (wrong handling catalog attribute).We fixed it in 4.1.1
    In 4.1 you can try remove catalog attribute in hbm.xml, but correct solution is using 4.1.1

    Best

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problems when trying to insert a new record using Hibernate

You must be logged in to post in the forum log in