In what way does Seam complain?
Well... it complains that the interface it's trying to retrieve isn't mapped:
java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Bankable is not mapped [SELECT b FROM Bankable b where client.id = :el1]
Now I'm assuming this is the case because my interface (Bankable) has no JPA/Hibernate annotation. And that's kinda the second issue; how to annotate an interface. So far, it seems it's not really supported.
This should definately work - Hibernate supports 'implicit polymorphism' in its queries. i.e. you should be able to create a query like 'select o from Object o' and it'll pull everything out of the database.
Try using the fully qualified name for your interface in your query e.g.
SELECT b FROM com.myorg.model.Bankable b where client.id = :el1
I'll certainly try that. Thanks. I've just tried the SELECT o FROM Object o, but it barfs on the FROM clause.
I fully qualified the interface name in my ejbql and it's working!
Thanks for the top tip!