为什么我用hibernate去save一条数据时,总是报ids for this class must be manually assigned before calling save(): cn.czq.entity.Product; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): cn.czq.entity.Product 但是只有id不自动增加就没问题
这要看你用的什么数据库,如果是oracle你把generator 该为assigned, 如果是mysql你要设置为native,你可以试下