-->
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.  [ 3 posts ] 
Author Message
 Post subject: Newbie - Switchable mapping?
PostPosted: Mon Apr 23, 2007 7:25 am 
Newbie

Joined: Mon Apr 23, 2007 7:05 am
Posts: 2
Location: Istanbul, Turkey
Hello,
I'm trying to evaluate whether we can use Hibernate for our project. I've been reading for several hours now and I'm stuck at some point. It looks like we cant use it but I'd like to be sure.

In the project there will be business logic classes, lets say, ShowEntity and it will be functionally the same for every type of entity. The only thing that is changed is the data content (wrong, it should be: the tables and as a result the columns). We dont want to put things like table names, table columns (database specific code) in the java code.

That means we need to be able to use a different table mapping for one class with respect to different values of an argument.
Is it possible to map a class to different tables and can we choose with respect to the argument that comes from the class?

I found that it's possible "Mapping a class more than once". (http://www.hibernate.org/hib_docs/v3/re ... pping.html)
But I couldnt find anything more than that. And I couldnt exactly understand whether its what I want.

Thank you for any comment and suggestion.
Cheers,
Elif


Last edited by elifkus on Mon Apr 23, 2007 8:14 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 8:04 am 
Regular
Regular

Joined: Mon Jun 12, 2006 5:33 am
Posts: 63
Hi elifkus,

when you say
Quote:
The only thing that is changed is the data content.

I think you don't need several mappings for that. The data is contained in the database. Each different instance of the ShowEntity class will be populated by each row from where different row of data, Isn't it? Or I don't understand what you're talking about.
chucky

Don't forget to rate if this helps
------------------------------------


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 8:17 am 
Newbie

Joined: Mon Apr 23, 2007 7:05 am
Posts: 2
Location: Istanbul, Turkey
Yes I wrote it wrong. I'm sorry. It should be the tables and as a result the rows not the data content.

Elif


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.