]
Steve Ebersole closed HHH-653.
------------------------------
Closing stale resolved issues
Insert on an optional joined table with non insertable properties
-----------------------------------------------------------------
Key: HHH-653
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-653
Project: Hibernate Core
Issue Type: Bug
Components: core
Environment: JDK 1.4.2_08, Oracle JDBC driver 9.2.0.4.0
Reporter: Emmanuel Bourg
Attachments: join-insert.patch, joined-table-persist.patch
Hibernate generates an INSERT on an optional joined table even if the properties of this
table are flagged as not insertable. This leads to a database error if the joined table is
read only.
For example with the following mapping:
<class name="Cat" table="CAT">
<id name="id" column="CAT_ID" type="int">
<generator class="sequence">
<param name="sequence">CAT_SEQ</param>
</generator>
</id>
<join table="CAT_INFO" optional="true">
<key column="CAT_ID" />
<property name="tamed" column="TAMED"
type="boolean" insert="false" update="false"/>
</join>
</class>
Hibernate will generate two queries, the first one to insert in the CAT table, and the
second on to insert in the CAT_INFO table, even if the "tamed" properties is not
persisted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: