I am trying my first Hibernate-based application, and I cannot get a simple load() to return a result. The relevant line is
Code:
EmployerInfo ei = dao.load(40001);
The load() command is not throwing an error -- it just returns null. The logs say
Code:
DEBUG - SQL - select employerin0_.employer_id as employer1_0_0_, employerin0_.employer_name as employer2_0_0_ from zjp_employers employerin0_ where employerin0_.employer_id=?
Hibernate: select employerin0_.employer_id as employer1_0_0_, employerin0_.employer_name as employer2_0_0_ from zjp_employers employerin0_ where employerin0_.employer_id=?
DEBUG - AbstractBatcher - preparing statement
DEBUG - IntegerType - binding '40001' to parameter: 1
DEBUG - AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG - Loader - processing result set
DEBUG - Loader - done processing result set (0 rows)
However, when I execute the logged SQL, "select employerin0_.employer_id as employer1_0_0_, employerin0_.employer_name as employer2_0_0_ from zjp_employers employerin0_ where employerin0_.employer_id=40001", directly on the database, it does return one row.
Can anyone suggest what I might be missing? I would be happy to give additional information, but I don't know what would be useful. I am using hibernate-3.2.6.ga.jar.