Question : SQL Grammer exception for Hibernate query

I am getting sqlgrammer exception

for the following hibernate query
SELECT d.deviceSid
FROM Equip d WHERE d.model= :model

1829 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 904, SQLState: 42000
1829 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00904: "D"."MODEL": invalid identifier

My equip pojo has it

public class Equipimplements java.io.Serializable {

     private Long model;
}

Answer : SQL Grammer exception for Hibernate query

<sql-query name="validateDeviceExists">
         
       <return alias="device" class="com.main.test.entity.Device">
           <return-property name="deviceid" column="DEVICE_ID"/>    
      </return>
               <![CDATA[SELECT d.device_id
                FROM  Equip d WHERE  d.model= :model]]>
  </sql-query>

Do you have the model column in the Equip table?
Random Solutions  
 
programming4us programming4us