2 Replies Latest reply on Jul 31, 2006 4:35 AM by pouriya zarbafian

    Override Primary Key Mapping

    pouriya zarbafian Newbie

      I am trying to override the primary key mapping in subclasses. The problem is that the table created for the subclass keeps both two columns: the primary key of the superclass and the overriden mapping.
      Here is the code:

      public abstract class MyAbstractSuper {
      private Long id_MyAbstractSuper;
      public Long getId_MyAbstractSuper() {
      return id_MyAbstractSuper;
      public void setId_MyAbstractSuper(Long id_MyAbstractSuper) {
      this.id_MyAbstractSuper = id_MyAbstractSuper;

      public class MySubClass extends MyAbstractSuperclass {

      public Long getId_MyAbstractSuperclass(){
      return super.getId_MyAbstractSuperclass();

      I read that there was a bug with javassist and tried to replace it with cglib but the problem still remains.

      Thank you.