hib generated query (ugly... :D )
select propostaor0_.cmp as cmp, propostaor0_.prg as prg,
propostaor0_.C_CMP as C_CMP,
propostaor0_.N_PRG_RIC_ORD as N_PRG_RI4_,
propostaor0_.C_STA_RIC as C_STA_RIC,
propostaor0_.C_TIP_ORD as C_TIP_ORD
from LOY_RIC_ORDINE propostaor0_
where (propostaor0_.cmp=? )and(propostaor0_.prg=? )
propostaor0_.cmp
propostaor0_.prg
are not valid column names, they are named C_CMP and N_PRG_RIC_ORD
so why hib does that??
im posting the mapping doc too
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="fuckthegest.model.PropostaOrdine" table="LOY_RIC_ORDINE">
<meta attribute="class-description">
Represents a single proposta d' ordine.
</meta>
<composite-id>
<key-property name="cmp" />
<key-property name="prg" />
</composite-id>
<property name="cmp" type="string" column="C_CMP" not-null="true"/>
<property name="prg" type="int" column="N_PRG_RIC_ORD" />
<property name="stato" type="string" column="C_STA_RIC" />
<property name="tipo" type="string" column="C_TIP_ORD" />
</class>
</hibernate-mapping>