org.hibernate.HibernateException: Wrong column type in for column. Found: smallint, expected: integer

Description

A field of type Integer is not accepted, only Short, in a Java Entity class for a MySQL table column of type smallint(6) unsigned.
org.hibernate.HibernateException: Wrong column type in . for column *. Found: smallint, expected: integer

Environment

hibernate-jpa-2.0-api.jar 1.0.0.Final, MySQL 5.5.24-5-log (Debian)

Activity

Show:
Matti Linnanvuori
January 25, 2013, 1:06 PM
Edited

private Short ordering;

@Column(name="ordering")
public Short getOrdering() {
return ordering;
}

public void setOrdering(Short ordering) {
this.ordering = ordering;
}

Assignee

Unassigned

Reporter

Matti Linnanvuori

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Affects versions

Priority

Major
Configure