Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.0
Mapping documents:
Full stack trace of any exception that occurs:
org.springframework.orm.hibernate.HibernateQueryException: could not resolve property: user.userID of: JoinedSubclass
Name and version of the database you are using:pl/sql
HI all,
can you please help me ....
I am using any tag with table per concrete class mapping following is the mapping:- there is a abstract class abstractClass
mapping for abstractClass.hbm.xml:-
<class Class1
...
><id name="userID"..../> </class>
<class Class2
...
><id name="userID"..../> </class>
now there is another class UtilClass which has a joined subclass in it and any tag for the above two classes like this:-
mapping for UtilClass.hbm.xml:-
<class name="UtilClass"....
<any name="user" id-type="java.lang.Long" meta-type="string">
<meta-value value="USER1" class="Class1"/>
<meta-value value="USER2" class="Class2"/>
<column name="userID"/>
<column name="user_id"/>
</any>
.......
<joined-subclass name="JoinedClass".....>
.....
..
</class>
now I need to run a query like this :-
"select joinedSubclass from JoinedSubclass where joinedSubclass.user.userid= :1232"
this query is giving me runtime exception as ---
org.springframework.orm.hibernate.HibernateQueryException: could not resolve property: user.userID of: JoinedSubclass
Read this:
http://hibernate.org/42.html