Regular |
|
Joined: Mon Aug 22, 2005 1:11 pm Posts: 50 Location: Pasadena, CA
|
Hi Everyone,
I am trying to use the @Inheritance(strategy=InheritanceType.JOINED) annotation with this query:
@NamedQuery(name="RbacRole.getPermissionsByType",
query="select p " +
"from RbacRole as role " +
"join role.permissions as p " +
"where role.pk = :pk and p.class = :clazz")
when I execute the query I get the following exception:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
on the class property.
When I drop the p.class = :clazz from the query it works (obviously I dont get the resluts I wanted).
I have been debugging and trying alternatives for a while now any help would be greatly appreciated.
Also, with SINGLE_TABLE it works just fine.
Thanks,
Mike
|
|