wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes No mapped data? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No mapped data?" Watch "No mapped data?" New topic
Author

No mapped data?

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
I tried several variations but none worked for me. The annotated mappings did not take place (i.e. mapped fields not populated by Hibernate). I knew I am doing something wrong or lack thereof some essentials. If I may run this by you, please help point out what I need to do to make this work.

I have 4 Classes: Business, Category, Consumer, PurchasedItem.

POJO Class Business:
POJO Class Category:

POJO Class Consumer:
POJO Class PurchasedItem:

After I created new rows for each class, none of the JoinColummn(s) specified under @ManyToOne or @OneToMany was populated with mapped data. E.g.

Table: Category

cat_id: 1
cat_name: Parks
con_id: NULL

Any help will be greatly appreciated.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No mapped data?
 
Similar Threads
Outer join between 3 entities in HQL
@ManyToOne - extra column?
using 2 @OnetoMany annoations in one Entity Class
Why is my Hibernate Search query not working?
Edit primary key, if it's a foreign key