aspose file tools*
The moose likes Object Relational Mapping and the fly likes hbm file returning wrong result Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hbm file returning wrong result" Watch "hbm file returning wrong result" New topic
Author

hbm file returning wrong result

Rui Felix
Greenhorn

Joined: Jun 13, 2006
Posts: 8
Hi All,

I have two tables related and I built two hbm files.
The relation between tables are one-to-many.
Everything worked fine but I discovered that I am only getting one record from the many table, and I'm sure that I should be getting more thant one record from the many side.

As you can see I've used a Set with a relation of one-to-many.
Do I have something wrong?

Many Impl Class



Main hbm file


Impl class that is called from the first hbm file



Hbm file of Impl class that is called from the first hbm file



Does any one knows what is the problem?

Could any one help?

Many Thanks,
Rui Felix
[ October 01, 2008: Message edited by: Rui Felix ]
Rui Felix
Greenhorn

Joined: Jun 13, 2006
Posts: 8
Got the problem fixed.

Just needed to specify the table's primary key correctly. My primary key was three attributes and I only had one specified on hibernate.

Many Thanks,
Regards,
Rui Felix
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hbm file returning wrong result