报错信息:org.hibernate.MappingException: Could not determine type for: java.long.Integer, at table: t_user, for columns: [org.hibernate.mapping.Column(age)]
解决方法:hibernate类型和java中的类型是不一样的,在hibernate的xml文件中设置的type指的是hibernate中的类型,而不能使用java.long.Integer
hibernate中的类型有string,integer, date,long, short, float, double, character, byte, boolean等等

错误:<property name="age" column="age" type="java.long.Integer" >
正确:<property name="age" column="age" type="integer" >
4004




被折叠的 条评论
为什么被折叠?



