hi.
writing to a MySQL database table with the followinf code works without problems:
User user = new User();
user.setUserId("1362");
user.setUserName("Franz Mustermann");
user.setUserPassword("test123");
Session session = SessionManager.currentSession();
Transaction tx = session.beginTransaction();
session.save(user);
tx.commit();
but if I want to read the data from the table with the following code, there is an exception:
Session session = SessionManager.currentSession();
Transaction tx = session.beginTransaction();
/* The following row will end in an exception:
Column 'USER1_0_' not found. */
List user = session.createSQLQuery("select USER_ID, USER_NAME, USER_PASSWORD from user u").addEntity("user", User.class).list();
tx.commit();
what is my mistake in the code?