tags:

views:

596

answers:

2

I have a class Animal and an interface it inherits from IAnimal.

@MappedSuperclass
public class Animal implements Serializable, IAnimal{...}.

@Entity
public class Jaguar extends Animal{...}

My first question is, do I need to annotate the interface?

I asked this because I am getting this error when I run my tests:

Error compiling the query [SELECT s FROM animal s WHERE s.atype = :atype]. Unknown abstract schema type [animal]

If I remember correctly, before I added this interface it was working.

+1  A: 

This error is occurring because you spelled Animal with a common a in the query. Try this:

 SELECT s FROM Animal s WHERE s.atype = :atype
Vincent Ramdhanie
+1  A: 

Does

SELECT s FROM Animal s WHERE s.atype = :atype

work? (just changed the case of animal)

Antonio