I work Mybatis 3.1.1 and Postgresql 9.2. I Have Class Student (id, name). I want to insert a new record in the database and get its Id.
my code is
Student s=new Student();
s.setName("javagc");
studentMapper.insertSelective(s);
but s.getId()
is null
.
Can anybody help me?