-->
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.  [ 1 post ] 
Author Message
 Post subject: Problem in mapping Single table with multiple Pojos
PostPosted: Fri Sep 07, 2007 9:54 am 
Newbie

Joined: Tue Jun 26, 2007 5:45 am
Posts: 4
Hi All,

I have a very typical problem
We have a table e.x Customer which contains the data about the different types of customer.

Table Customer
Customer table has 100 columns

POJO Class hierarchy is
Customer(Parent)
ATypeCustomer(Child of Customer)
BTypeCustomer(Child of Customer)

The problem is
Some columns are common across both the subclasses.
Some are specific to ATypeCustomer
Some are specific to BTypeCustomer

Constraints(We can't change(Add discrimnator columns) any table in the DB as many other applications are using that db)

Flexibility we can modify our classes according our need.


So can any one help me how can I generate the hibernate mapping files for these classes.


Thanx in advance

Amit Verma

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


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

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.