[Hibernate-JIRA] Created: (ANN-598) Add ON clause to @ForeignKey
by Christian Bauer (JIRA)
Add ON clause to @ForeignKey
----------------------------
Key: ANN-598
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-598
Project: Hibernate Annotations
Issue Type: New Feature
Components: binder
Reporter: Christian Bauer
More important than it sounds:
@org.hibernate.annotations.ForeignKey(name = "FK_FEED_DIRECTORY_ID")
I need ON CASCADE DELETE on many of my foreign keys, so I have to do this right now via:
<hibernate-mapping>
<database-object>
<create>
alter table FEED drop constraint FK_FEED_DIRECTORY_ID;
alter table FEED add constraint FK_FEED_DIRECTORY_ID foreign key (DIRECTORY_ID) references NODE on delete cascade;
</create>
<drop></drop>
</database-object>
</hibernate-mapping>
This is a bit annoying, especially since @JoinColumn(columnDefinition) is also not an option - I don't want to hardcode my HSQL datatypes.
So we should accept a parameter on @ForeignKey (I know that the Hibernate binder doesn't have that notion at all, we need it in native Hibernate as well) that accepts "[ON {DELETE | UPDATE} {CASCADE | SET DEFAULT | SET NULL}];" and does the right thing during schema export.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months
[Hibernate-JIRA] Created: (ANN-805) created duplicates in database
by khajaasmath (JIRA)
created duplicates in database
------------------------------
Key: ANN-805
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-805
Project: Hibernate Annotations
Issue Type: Bug
Environment: HIBERNATE3,ORACLE,WEBLOGIC SERVER
Reporter: khajaasmath
We had an issue with child records becoming null in the application and we have solved it by adding inverse='true' parameter.now when wwe checked the database,duplicate records are present and these are created when uploading the data through an excel file from the application.we are uploading bulk dat using csv file and maintained a transaction procedure ince the uploading is finish confirmation will obtain stating data has been uploaded.If any thing goes wrong the data will be rolled back...
This is very crutical issue in my application since large amount of duplicate data is inserted into database.kindly help me in solving this issue.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months