error:ids for this class must be manually assigned before calling save()
出现此错误是生成配置文件时,主键的生成方式有问题,通用的一般使用native,如要效率更高一些,可根据选用的数据库而定。
解决方案:
<id name="id" type="java.lang.Integer">
<column name="id" />
<generator class="native"/>
</id>