File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with Reverse Engineering to create JAVA objects

Ish Fad
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using MYSQL Database with Eclipse helios.
I am having problem adding object to POJO (Class created by Hibernate reverse engineering).
I have two tables customer and stitle. I have created One-to-Many relationship in MYSQL between this two tables.
titleId is foreign key in customer table. so one to many relation exist.


customerId as int(11) primary Key
titleId as Int(11) foreignKey FK_CTitleId (which is match to titleId in stitle table)
firstname as string(45)


titleId as int(11) primary Key
title as string(45)

When I run reverse engineering, I get two object and
Also get two Customer.hbm.xml and Stitle.hbm.xml.
But I am getting titleId in Customer object as an Integer and not as STitle object.

Here is my hibernate-reverse-engineering file.

JAVA object it created

I don't understand why it is creating titleId as integer. It suppose to be object for table sTitle.

Please can someone help me.

Many thanks
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic