-->
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: <Component> and hierarchy of classes
PostPosted: Fri Nov 19, 2004 11:15 am 
Newbie

Joined: Mon Feb 23, 2004 11:43 am
Posts: 3
Hibernate version: 2.0.3

I have the abstract class Price that has two subclasses RealPrice and Yield. I want to use Price as a <component> in other class . Is it possible to do this without giving an <uid> to the class Price?

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 19, 2004 11:16 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, only entities can be polymorphic. Use a normal entity mapping and cascade="all".

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


Top
 Profile  
 
 Post subject: can I store it as a "serializable"?
PostPosted: Fri Nov 19, 2004 11:54 am 
Newbie

Joined: Mon Feb 23, 2004 11:43 am
Posts: 3
example:

<property name="price" column="price" type="serializable"/>


I'm using Mysql and I'm storing it in a field of type "varchar" (255)


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.