Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi,
iam trying to use subselect query..Iam getting exception tht
:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
<hibernate-mapping package="hibernate">
<class name="ResInfo" table="resinfo">
<id name="resId" column="res_id" >
<generator class="assigned"/>
</id>
<property name="firstName" column="first_name" type="string"/>
<property name="aPhys" formula="(select r.first_name from resinfo as r,pro as p where r.res_id =p.pract_id)"/>
<property name="lastName" column="last_name" type="string" />
</class>
</hibernate-mapping>
In the main method iam using a hql query like:
select res.aPhys from ResInfo res;
Iam getting the exception..Is there a rule tht subquery written in
<property formula=""/>
shuld return only one result...
How to solve this problem..Can any one pls help..
Thnx..