Hi !
I'm new in Hibernate but I have been working using Stored Procedures and I think you can not use nested components.
I have some working mappings and they look like this:
<hibernate-mapping>
<class name="pt.company.comuns.adp.vo.ObterBloqueio" schema="ADM">
<composite-id name="id" class="pt.company.comuns.adp.vo.ObterBloqueioId">
<key-property name="cfrConReg" type="java.lang.String" column="CFR_COD_REG" length="15" />
<key-property name="cfrCodTip" type="java.lang.String" column="CFR_COD_TIP" length="3" />
<key-property name="cfrCodOpr" type="java.lang.String" column="CFR_COD_OPR" length="7" />
<key-property name="cfrCodConta" type="java.lang.String" column="CFR_COD_CONTA" length="8" />
<key-property name="cfrCodReg1" type="java.lang.String" column="CFR_COD_REG_1"/>
<key-property name="cfrCodOpr1" type="java.lang.String" column="CFR_COD_OPR_1"/>
</composite-id>
<property name="cfrConBanCli" type="java.lang.Long">
<column name="CFR_CON_BAN_CLI" length="9" not-null="true" />
</property>
<property name="cfrConBanNat" type="java.lang.Long">
<column name="CFR_CON_BAN_NAT" length="2" not-null="true" />
</property>
<property name="cfrConBanSeq" type="java.lang.Long">
<column name="CFR_CON_BAN_SEQ" length="3" not-null="true" />
</property>
<property name="cfrCodEst" type="java.lang.String">
<column name="CFR_COD_EST" not-null="true" />
</property>
<property name="dataCriacao" type="java.util.Date">
<column name="DATA_CRIACAO" not-null="true" />
</property>
<property name="cfrTexto" type="java.lang.String">
<column name="CFR_TEXTO" not-null="true" />
</property>
<property name="cfrCodMov" type="java.lang.String">
<column name="CFR_USR_MOV" not-null="true" />
</property>
<property name="cfrDatMov" type="java.util.Date">
<column name="CFR_DAT_MOV" not-null="true" />
</property>
<property name="cfrChnMov" type="java.lang.String">
<column name="CFR_CHN_MOV" not-null="true" />
</property>
<property name="cfrCodTit" type="java.lang.String">
<column name="CFR_CODTIT" length="9" not-null="false"/>
</property>
<property name="cfrCofre" type="java.lang.String">
<column name="CFR_COFRE" length="2" not-null="false"/>
</property>
<property name="cfrQt" type="java.lang.Long">
<column name="CFR_QT" not-null="false"/>
</property>
<property name="cfrGrau" type="java.lang.Long">
<column name="CFR_GRAU" length="2" not-null="false"/>
</property>
</class>
<sql-query name="ObterBloqueio" callable="true">
<return class="pt.company.comuns.adp.vo.ObterBloqueio">
<return-property name="id">
<return-column name="CFR_COD_REG"/>
<return-column name="CFR_COD_TIP"/>
<return-column name="CFR_COD_OPR"/>
<return-column name="CFR_COD_CONTA"/>
<return-column name="CFR_COD_REG_1"/>
<return-column name="CFR_COD_OPR_1"/>
</return-property>
<return-property name="cfrConBanCli" column="CFR_CON_BAN_CLI"/>
<return-property name="cfrConBanNat" column="CFR_CON_BAN_NAT"/>
<return-property name="cfrConBanSeq" column="CFR_CON_BAN_SEQ"/>
<return-property name="cfrCodEst" column="CFR_COD_EST"/>
<return-property name="dataCriacao" column="DATA_CRIACAO"/>
<return-property name="cfrTexto" column="CFR_TEXTO"/>
<return-property name="cfrCodMov" column="CFR_USR_MOV"/>
<return-property name="cfrDatMov" column="CFR_DAT_MOV"/>
<return-property name="cfrChnMov" column="CFR_CHN_MOV"/>
<return-property name="cfrCodTit" column="CFR_CODTIT"/>
<return-property name="cfrCofre" column="CFR_COFRE"/>
<return-property name="cfrQt" column="CFR_QT"/>
<return-property name="cfrGrau" column="CFR_GRAU"/>
</return>
{ call WSP_GET_MOVBLOQ_HOST(?, :CFR_CON_BAN_CLI, :CFR_CON_BAN_NAT, :CFR_CON_BAN_SEQ, :CFR_COD_EST) }
</sql-query>
</hibernate-mapping>
The Stored Procedure returns some data on a cursor and I have a composite id in this case.
The database is Oracle 8i.
Read the following URL on Chapter 16.2
http://www.hibernate.org/hib_docs/v3/re ... procedures
about some limitations issues!