String[] columnNames = sessionFactory.getClassMetadata(Java.class).getPropertyNames();
Type[] columnTypes = sessionFactory().getClassMetadata(Java.class).getPropertyTypes();
我试试这段代码......
答案 0 :(得分:0)
String[] columnNames = getSessionFactory().getClassMetadata(Employee.class).getPropertyNames();
org.hibernate.type.Type[] columnTypes = getSessionFactory().getClassMetadata(Employee.class).getPropertyTypes();
尝试此代码Employee.class表示这是模型类名称