-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: mapping problem
PostPosted: Mon Dec 05, 2005 7:24 am 
Newbie

Joined: Mon Dec 05, 2005 7:09 am
Posts: 2
Hallo,

i am wondering if someone could help me with my little mapping problem. I already read the coresponding parts in the reference manual but i could not figure it out.

My mysql database has the following scheme:

productTable (common values for all products and shops)
productType1
productType2
productType3

i will map this to the following classes

product (interface)
shopProduct (customer specific product class, implements product interface)
productType1 (extends shopProduct)
productType2 (extends shopProduct)
productType3 (extends shopproduct)

my problem is that two fields (vendorId, vendorCatId) of the productTypeX tables are common to all products. So this fields are part of the shopProduct class and not of the detail productType classes.

Have you any suggestions how to map this?

Thanks!
Steffen


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 12:46 pm 
Newbie

Joined: Mon Dec 12, 2005 11:37 am
Posts: 14
You might want to read hibernate documentation on the different strategies for handling inheritence.

http://www.hibernate.org/hib_docs/v3/re ... tance.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.