Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.1
Mapping documents:
<?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>
<class name="pack.I18nTest"
table="i18ntest">
<id name="id" column="id" type="java.lang.Long">
<generator class="native"/>
</id>
<property name="description" type="I18nlabel"
column="description" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: MySQL 4.1
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
From my tests, it seems that if I do not specify the property name for id in the hbm file above, meaning if I delete the 'name="id"' from the mapping, the id will not be populated with the autogenerated value from the database (the entity is saved, everything else works as expected). I don't know if this is how it is intended to be, or is a bug, that's why I posted it here, maybe somebody can check and if it's a bug than someone can fill a bug with it (I don't think I have the right to fill in issues in jira)
thanks