The CalendarioOuro class must have a "non-foreign" id generator. In your case you have both your id generators as foreign which is not possible. What id-generator = foreign means is that the id will be dertived from the primary key of a one-to-one association.
In your case case try:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.matera.bmf.entity">
<class name="Calendario" table="BF_CALENDARIO">
<id name="idCalendario" column="ID_CALENDARIO" type="long">
<generator class="assgined">
</generator>
</id>
What this means is that the "id" for Calendario should be assigned by the Persisting class (i.e. before calling "saveXXX" methods).
Hope that helps.