On February 25, 2003 04:21 am, Konstantin Priblouda wrote:
> --- Adam Sherman <[EMAIL PROTECTED]> wrote:
> > I have an base class "Persistent" that all my
> > persistent class extend from. My
> > problem is that this class contains the basic fields
> > like "id" and I need the
> > generated hbms to include these. However, there
> > should be no mapping/table
> > for Persistent itself since it is abstract.
> >
> > How do I do this?
>
> Just place your hibernate tags in superclass
> ( on method level ) - xdoclet will find
> them if your base class source os available at
> processing time.
Thanks for your response!
Doesn't seem to work for me though. Here are my class definitions:
public abstract class Persistent implements Serializable
This class has its getId() method marked with @hibernate.property
@hibernate.id.
public abstract class Publication extends Persistent
@hibernate.class and all get**() methos marked with @hibernate.property
public class Periodical extends Publication
@hibernate.subclass and all get**() methods marked with @hibernate.property
One hbm gets generated, Publication.hbm.xml, containing everything but the
mapping for "id".
In the future, there will be more Persistent and Publication subclasses.
Thanks very much for your insight,
A.
--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user