I was doing reverse engineering in eclipse with hibernate tools, and I have followed steps stated in the
http://www.hibernate.org/hib_docs/tools ... e/en/html/
all was going alright, in the hibernate configuration window I can see my database , tables ,objects but when I click code generation the strange message appears :
org.hibernate.cfg.JDBCBinderException: Foreign key name ($1) mapped to different tables!
I use PostgreSQL 7.4.7 and jdbc driver pg74.216.jdbc3.jar
and here is the code of my database:
create table car_owner(id serial primary key,name varchar(20),
surname varchar(20),jmbg integer);
create table reg_plate(id serial primary key,plate_signature char(2),
plate_number integer unique,id_car_owner integer references car_owner);
create table address(id serial primary key,street varchar(20),
city varchar(20),country varchar(20),id_car_owner integer references car_owner);
I would be gratefull if some could help me.