-->
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: Can I do this?
PostPosted: Mon Jul 12, 2004 3:04 am 
Newbie

Joined: Mon Jul 12, 2004 2:52 am
Posts: 17
i have following design in mind, but dunno is it appropriate or any better way to do that:

i want to make two classes: Payment & CompletedPayment
in which CompletedPayment extends Payment
with more specific attributes

i would use the <joined-subclass> to include the definition of CompletedPayment inside Payment

my system would first create a Payment object and save into DB

somewhen later, upon request, the system would load the Payment obj, cast (or copy or else?) it as CompletedPayment, add the details, then saveOrUpdate it back to DB.
so that the CompletedPayment details is saved into the joined table, while updating the Payment table...

It seems im marrowing the class of a persistent obj. Im doubt can i achieve that or should use another approach.

any suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 12, 2004 10:13 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
somewhen later, upon request, the system would load the Payment obj, cast (or copy or else?)


nop, delete and create a new CompletedPayment based on the old payment properties

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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.