Hi,
I am completely new to Hibernate and I fear that the question has been asked quite a few time, but I could not find any answer.
I have an existing object model, which should not be changed. In this data model a lot of artificial keys are used like for the following class
class User {
private OID oid;
private String name;
....
....
....
}
The corresponding database table is:
table USER (
oid NUMBER(10,0)
name varchar(50)
)
How can I map this! The first idea,
<hibernate-mapping package="...">
<class
name="User"
table="USER">
<id
name="oID"
column="OID"
type="....OIDImpl">
<generator class="assigned">
</generator>
</id>
</hibernate-mapping>
causes the understandble error
ORA-00932: tipos de dato inconsistentes: se esperaba NUMBER se ha obtenido BINARY
(Inconsistent data types: NUMBER expected, BINARY received)
Any help would be apreciated
PS: I use Hibernate 3
|