-->
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: Hibernate, XDoclet and interfaces
PostPosted: Tue Oct 21, 2003 2:21 pm 
Newbie

Joined: Mon Sep 01, 2003 5:10 am
Posts: 7
Location: Freiburg, Germany
Hi,

I have an interface (shortened for demo purposes):

Code:
/**
* @hibernate.class table="tbl_customer" discriminator-value="Customer"
* @hibernate.discriminator column="discrim"
*/
public interface Customer extends Auditable {
   /**
    * @hibernate.id generator-class="sequence"
    * @hibernate.generator-param name="sequence" value="seq_customer"
    */
   public Long getId();
   public void setId(Long value);

   /**
    * @hibernate.component
    */
   public Login getLogin();
   public void setLogin(Login login);
}


plus a class which implements interface Customer:

Code:
/**
* @hibernate.subclass discriminator-value="BaseCustomer"
*/
public class BaseCustomer implements Serializable, Customer {
   private Long _id;
   private Login _login;

   public Long getId() {
      return _id;
   }

   public void setId(Long value) {
      _id = value;
   }

   public Login getLogin() {
      return _login;
   }
   
   public void setLogin(Login login) {
      _login = login;
   }

   public AuditInfo getAuditInfo() {
      return _auditInfo;
   }
   
   public void setAuditInfo(AuditInfo value) {
      _auditInfo = value;
   }
}


Auditable also has hibernate xdoclet tags. So far so good.

When I generate my mapping files however, the the subclass is not included in the mapping file at all, just that from Customer (plus the tags from Auditable).

I've searched all over the place, without any luck apart from one reference from the old SF forums: http://forum.hibernate.org/old/913295.html which is exactly the problem I'm having.

Is this at all possible, a bug or should I approach this in another way? I be grateful for any pointers.

TIA,

John


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2003 5:17 pm 
Newbie

Joined: Mon Sep 01, 2003 5:10 am
Posts: 7
Location: Freiburg, Germany
Ok, ignore the above request for help. Wasn't thinking clearly...

- John


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.