views:

405

answers:

1

The hibernate (I'm using version 3.4) documentation for hql says that it supports interfaces, and I'm having trouble getting it to work. I have some persistent classes (not inherited from eachother, but sharing many functions) that all share an interfaces (CategorizableEntity). I can use it with instanceof in my java code, but I cannot query for it ("from CategorizableEntity").

I have it annotated with @Entity, but hibernate will not let me map it like the others. Is this possible? Is there a special way to map it that I can't find?

Thank you! Joshua

A: 

try to use the full name of your interface (eg: java.util.Set instead of Set)