I am using Hibernate 3.2, and am trying to reverse engineer a Postgresql (version 8.0.6) DB. The DB has a handful of tables that reference other tables. For example, the table named "agent" makes a reference to another table named "location" using the following syntax:
CONSTRAINT agent_location_fkey FOREIGN KEY ("location")
REFERENCES "location" (id) MATCH SIMPLE
ON UPDATE RESTRICT ON DELETE RESTRICT
The mapping looks like:
<many-to-one name="location" class="Location" fetch="select">
<column name="location">
</column>
</many-to-one>
My very simple Java test program simply tries to create a session:
Session session = HibernateUtil.currentSession();
I get the error below which I can't find trouble shooting info on. Does anyone have any ideas/suggestions?
[java] INFO: Mapping collection: Location.agents -> agent
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at HibernateUtil.<clinit>(Unknown Source)
[java] at Test.main(Unknown Source)
[java] Caused by: org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(version)]
|