0
Когда я запускаю команду в приглашении mysql, она работает правильно.Исключение, таблица не отображается
SELECT d.lastUpdatedDate,c.phoneNumber1,d.simImea1, d.simImea2,d.model,c.latitude, c.longitude from connectionDetails c inner join deviceDetails d on (c.deviceUniqueIdentity = d.deviceUniqueIdentity AND d.rowStatus='0')
Исключение
Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: connectionDetails is not mapped [SELECT d.lastUpdatedDate,c.phoneNumber1,d.simImea1, d.simImea2,d.model,c.latitude, c.longitude from connectionDetails c inner join deviceDetails d on (c.deviceUniqueIdentity = d.deviceUniqueIdentity AND d.rowStatus='0')]
at org.hibernate.hql.internal.ast.QuerySyntaxException.generateQueryException(QuerySyntaxException.java:96)
at org.hibernate.QueryException.wrapWithQueryString(QueryException.java:120)
ConnectionDetails.hbm
<hibernate-mapping>
<class name="com.mypackage.CConnectionDetails"
table="connectionDetails">
<id name="connectionUniqueIdentity" type="java.lang.String">
<column name="connectionUniqueIdentity" />
<generator class="assigned" />
Edit:
Query query = currentSession().createSQLQuery(sql);
Как вы выполняете этот запрос из спящего режима? –
Да, я использую createQuery. Я изменил его на createSQLQuery и проверил – Siddharth