-->
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: What is the right approach for mapping of an abstract class?
PostPosted: Wed Jun 16, 2004 8:40 am 
Regular
Regular

Joined: Tue Jan 13, 2004 4:57 am
Posts: 83
Sorry for the near-xpost, there is a question I have posted regarding xdoclet on the tools forum which originated another question that i post here:

I have a hierarchy such as

class A

class B extends A

abstract class C extends A

class D extends C
class E extends C

Class C is only a class that factors out logic from D and E, and as such has no persistent fields, nor has a table associated (while the rest of the hierarchy is mapped with joined-subclass).

I would like to know which of the following is the best (or "right") approach:
    can I simply ignore the abstract class and do not map it?
    do I need to create a table and a mapping for C even if it does not contain any persistent data?
    is there maybe a way to put a mapping that does not refer to a concrete table?

    can I map it on the same table that A is mapped on?
[/list][/list]


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.