[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1150) hibernate.hbm2ddl.auto update option is enforcing a foreign key constraint for many-to-one mapping with not-found="ignore"
Rani (JIRA)
noreply at atlassian.com
Thu Oct 22 05:41:28 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34261#action_34261 ]
Rani commented on HBX-1150:
---------------------------
closed it, as i was able to find a fix as per the comments in
http://opensource.atlassian.com/projects/hibernate/browse/HBX-494
i.e having foreign-key="none" in a many-to-one could prevent from FK constraints getting created.
> hibernate.hbm2ddl.auto update option is enforcing a foreign key constraint for many-to-one mapping with not-found="ignore"
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: HBX-1150
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1150
> Project: Hibernate Tools
> Issue Type: Bug
> Affects Versions: 3.2.cr1
> Environment: windows , hsqldb
> Reporter: Rani
>
> hi,
> i am using dbunit with hibernate for configuring datasets for test cases.
> As part of the test case/suite setup we configure the hsql in memory db and setup the database.
> We have used hibernate.hbm2ddl.auto update. I have few hbm's with many-to-one mappings with the attribute not-found="ignore" .
> Looks like the the above setting of hbm2ddl to update is enforcing FK constraint.
> Defining the FK constraint for just many-to-one should be okay, but it should not be enforced if the many-to-one mapping has the attribute not-found="ignore".
> The actual database in production does not have any FK constraint.
> Appreciate if we could get a fix or workaround for the same.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list