Hibernate version: 3.2.2/b]
[b]Mapping documents:
Code:
<constraint>
<set name="logs" lazy="true" inverse="true" cascade="save-update" sort="unsorted">
<key column="log_action_id" on-delete="cascade">
</key>
<one-to-many
class="com.seqis.kltm.model.db.project.logging.ProjectKLTMLog"
/>
</set>
</constraint>
Code:
<update>
<property name="createTAAutomatic" type="boolean" update="true" insert="true">
<column name="create_ta_automatic" default="0"/>
</property>
</update>
Name and version of the database you are using: MySQL 5.0, MSSQL 2000 8.00The generated SQL (show_sql=true):Creation:
-Mysql
Code:
alter table kltm_log_values
add index FK7BDAC42DE4A9234 (log_id),
add constraint FK7BDAC42DE4A9234
foreign key (log_id)
references kltm_log (object_id)
-MSSQL
Code:
alter table kltm_log_values
add constraint FK7BDAC42DE4A9234
foreign key (log_id)
references kltm_log
on delete cascade
Update:
-Mysql
Code:
alter table kltm_project_settings add column create_ta_automatic bit default 0
-MSSQL
Code:
alter table kltm_project_settings add create_ta_automatic tinyint default 0 null
I have two problems.
The first problem concerns the schemaexporter: the "on-delete=cascade" option has no effect on mysql. on mssql, the foreign key is created with the "on delete cascade" option.
The second problem concerns the schemupdate: i added a new boolean property. on mysql the update is executed correctly with the default, on mssql the column is created but no default ist set. the sql shows a "null" on its end.
can anyone tell what i am doing wrong?
thx in advance