Hi,
sorry for my poor english but.. ok..
I use MySQL 5.0, eclipse 3.1 and Hibtools.. so...
I have 2 tables
Attivita and pagIntervento
they are in one-to-one relation with fileld "id" (primary key for all)
when I run de code generation I see in Attivita.hbm.xml files :
<set name="pagInterventois" inverse="true">
<key>
<column name="id" not-null="true" unique="true" />
</key>
<one-to-many class="it.codex.business.hbm.PagPignterzo" />
</set>
and not:
<one-to-one
name="pagInterventoi"
class="it.codex.business.hbm.PagInterventoi"
outer-join="auto"
cascade="all"
lazy="false" >
<meta attribute="field-description">
@hibernate.one-to-one
outer-join="auto"
cascade="all"
lazy="false"
</meta>
</one-to-one>
as I wrote time ago without Hibernate-tool
There is somethings wrong in my tables in MYSQL ?.. how I must define foreign keys in the table ?
PS. In pagInterventoi table I define a foreign key to Attivita using id field..
thank you for reply..
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: