[jboss-user] [EJB 3.0] - <ENTITY> not mapped

hispeedsurfer do-not-reply at jboss.com
Thu Feb 1 11:03:28 EST 2007


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

Here my abstract superclass
  | @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
  | @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?


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

More information about the jboss-user mailing list