Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hibernate: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
08-11-2014, 08:27 PM, (This post was last modified: 08-11-2014, 08:28 PM by digdas.)
#1
Hibernate: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
The query it occurs on:
Code:
from User user where user.hometown=#{searchObject.town};

Mapping:
Code:
public class User {
...
@Column(name="HOMETOWN_ID", columnDefinition="NUMBER")
public Town getHomeTown() {
return homeTown;
}
...
}

The problem is the mapping. The class Town should be mapped with a ManyToOne mapping. So it should be:
Code:
public class User {
...
@ManyToOne
@JoinColumn(name="HOMETOWN_ID", columnDefinition="NUMBER")
public Town getHomeTown() {
return homeTown;
}
...
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)