What is wrong with this query?
FROM table_a as a WHERE a.id in ( from table_b as b where b.opt_value='dsd')
Hibernate version:
2.1.7c
Mapping documents:
Code:
<class name="Table_a" table="Table_a">
<id name="id" type="int">
<column name="id" sql-type="int" not-null="true" />
<generator class="native"/>
</id>
<property name="name" />
</class>
<class name="Table_b" table="Table_b">
<composite-id name="id" class="com.jme.Id" >
<key-property name="id" column="id"/>
<key-property name="opt_key">
<column name="opt_key" sql-type="varchar(255)" />
</key-property>
</composite-id>
<property name="opt_value">
<column name="opt_value" sql-type="text" />
</property>
</class>
Full stack trace of any exception that occurs:
2005-06-21 09:27:54,546 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL
Error: 1241, SQLState: 21000
2005-06-21 09:27:54,546 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Oper
and should contain 1 column(s)
Name and version of the database you are using:
MySql 4.1.12 (Win)