I am trying to do:
Code:
        
        public static Tprogram findProgramByKey( Long key) throws DataAccessException
       {
            Tprogram program = null;
          try
          {
             program = (Tprogram)HibernateSessionConfig.getCurrentSession().load(Tprogram.class, key);
          }
          catch( HibernateException e )
          {
             LOGGER.error( "Unable to find program for key = "+ key, e);
             throw new DataAccessException( e);
          }
          return program;
       }
I am deliberately passing a key that should result in a "not found", or something like that.
When I use get(Tprogram.class, key);, program=null, when I use load(Tprogram.class, key),  the result is
all program class variables are null.
No error is raised. Using Hibernate-2.1