My DB table consists of String id.. and in the mapping file, whats the generator class is used for ?
and one more basic doubt ! "The no.of properties of POJO should match with no.of columns in the DB ?" or the columns can be selective in hbm file ? because DB table consists of 10 columns and my login POJO consists of only 2 columns with String ID as one property ..
posted 6 years ago
generator class is used to generate the sequence mapped column values . For eg. Primary key in Employee table is Sequence based.
So you will define id attribute in Employee Entity and govern it by generator class .
You can selectively have few columns than in Table in your entity bean definition. Both counts are not required to be matching or same.