0

I dont know if this a error or a normal feature, but my MappedSuperclass properties arent reconized by JPA/hibernate after I use a multi hierarchy. I have those classes:

  @MappedSuperclass
  public abstract class AbstractDomain{
    private Integer userId;

    @Column
    public Integer getUserId(){
       return userId;
    }

    public void setUserId(Integer userId){
      this.userId=userId;
    }
  }

   public class Invoice extends AbstractDomain{
   }

  @Entity
  public class InvoiceEntity extends Invoice{

  }

Is that right?

LottaLava
  • 889
  • 1
  • 9
  • 21
  • Your code does not even compile private getUser(){} has no return type. Can you please show the "real" code? Thanks. – Simon Martinelli Sep 27 '18 at 06:39
  • I updated the code to something more practical, but I cant show the full code 'cause its too big and this little example display the issue well. But the problem only occuour when I going to persist an entity, to load a HQL its all good and fine. – LottaLava Sep 27 '18 at 17:42

0 Answers0