Hi,

I using a InheritanceType.SINGLE_TABLE and try to query this, but without 
success.

Here my abstract superclass
@Entity
  | @Name("person")
  | @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  | @DiscriminatorColumn(name = "PERSON_TYPE", discriminatorType = 
DiscriminatorType.STRING)
  | @SuppressWarnings("unused")
  | public abstract class Person extends BaseEntity{
  | 
  |     @Id @GeneratedValue     
  |     @Column(name = "PERSON_ID")
  |     private Long id;
  | ...

and the extended subclass
@Entity
  | @DiscriminatorValue("US")
  | @Name("user")
  | public class User extends Person
  | ..... {

Now when I use to query ("from person where PERSON_TYPE='US' order by name, 
forename") the user class the following exception is thrown
Caused by: org.hibernate.hql.ast.QuerySyntaxException: person is not mapped 
[from person where PERSON_TYPE='US' order by name, forename]

All tables are created when the app is deployed.

Using JBoss-4.0.5.GA with Seam 1.1.1


Any idea whats wrong in my app?


Thanks
Andreas

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009518
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to