-->
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: I want to know if I can map a class with a rocord on a table
PostPosted: Tue Aug 03, 2004 10:47 am 
Newbie

Joined: Tue Aug 03, 2004 10:31 am
Posts: 7
Hello, my question is: can I map a class with a rocord on a table??, that is to say, I've got a hierarchy classes that represents the possible state of an object. In relationals tables it is represented by a domain table, in where each state is a record on this table... can I map each one of this records in a diferent object???

Thank you, Gervasio

P.S: Justify me for the redaction. I'm speak spanish... and I understand something of english...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 10:55 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Well, I didn't understand it, but maybe others will.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 1:38 pm 
Beginner
Beginner

Joined: Thu Jul 22, 2004 2:15 pm
Posts: 35
Yerva,

this hibernate manual is in spanish: http://www.javahispano.org/articles.art ... tion?id=82

I don't know if its any good, I don't understand spanish that well..

I think he is asking if each record in the table can be a separate class.

Yerva,

Most common use of hibernate is a class per table. You might be able to use subclasses.
Look at this page:
http://www.hibernate.org/hib_docs/refer ... n-subclass

There is also an example, where table work can be either Song or Book, which are subclass of Work
http://www.hibernate.org/hib_docs/refer ... authorwork

I imagine you can use it how you want to, with some reading and celever thinking.

Hope that helps,
Pritpal Dhaliwal


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.