Hi, I am getting fowllowing exception when i try to insert the data using hibernate
INFO: Named query checking : enabled 13 Aug, 2007 11:11:52 AM org.hibernate.impl.SessionFactoryImpl <init> INFO: building session factory 13 Aug, 2007 11:11:53 AM org.hibernate.impl.SessionFactoryObjectFactory addInstance INFO: Not binding factory to JNDI, no JNDI name configured Inserting Record Hibernate: insert into CITY (CITY_NAME) values (?) could not insert: [com.quanta.movie.domain.City] 13 Aug, 2007 11:11:53 AM org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 1364, SQLState: HY000 13 Aug, 2007 11:11:53 AM org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Field 'CITY_ID' doesn't have a default value
What's your database that you are using? AUTO will use the default database way of generating IDs, so for instance, using MySQL which has primary Keys that auto increment their value when they receive and insert statement, versus Oracle which requires a Sequence table.