【发布时间】:2017-02-04 08:44:58
【问题描述】:
public List getAllEmployees()
{
return sessionFactory.openSession().createSQLQuery("select * from employee order by eid").list();
}
employee 表有一列ipadres,postgresql 中的类型为inet。
@Entity
@Table(name="employee")
public class Employee {
@Id
@Column(name="eid")
private int eid;
private int dept_id;
private String name;
private String address;
private String project;
private String password;
@Column(name="ipadres")
private String ipadres;
private double salary;
private Date Doj;
这是我的 pojo 课。我已将ipadres 作为字符串,但它给了我以下异常。
org.hibernate.MappingException:没有 JDBC 类型的方言映射:1111
【问题讨论】:
标签: java spring postgresql hibernate inet