[jboss-user] [EJB 3.0] - @Inheritance(strategy= InheritanceType.JOINED)

toni do-not-reply at jboss.com
Mon Nov 20 03:25:19 EST 2006


Hi,

my intention is to extend one entity bean from another using the JOINED stategey. I have a very simple setup, which produces the following exception:

jectName: persistence.units:ear=calc.ear,jar=calc.jar,unitName=userDatabase
  State: FAILED
  Reason: org.hibernate.AnnotationException: Unable to define/override @Id(s) on a subclass: de.test.Client
  I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=calcDS
  Depends On Me:
    jboss.j2ee:ear=calc.ear,jar=calc.jar,name=RegisterAction,service=EJB3

Here is the source code of the two entity beans:

@Entity
@Inheritance(strategy= InheritanceType.JOINED)
public class Person
{
  @Id
  public String lastname;

  String firstName;
  String street;
  String zipcode;
  String city;
  String country;
  String phone;
 ...
}


@Entity
public class Client extends Person
{
  @Id
  String hostname;
  
  String email;
  String customernumber;
  ...
}

Why is this not working?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987230#3987230

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987230



More information about the jboss-user mailing list