Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unable to specify cascading type using annotation

Jochen Gugel
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

We are developing an java web application and use DB2 as database.
For o/r mapping we use hibernate in version 3.2.6 ga
Furthermore the mapping is specified using hibernate annotations in version 3.3.1 GA.

In this context we have several tables where objects have a relationship to object of the same table e.g. an opportunity has an attribute parent, which is an other opportunity object.
Hibernate creates accordingly an alter statement which looks like this

Unfortunately DB2 needs the information how to handle this foreign key during deletion of entries.
We want to specify NO ACTION for such situations.

But how to achieve that?
I already tried different possibilities to define the cascading type with the use annotations, but none of them worked.
already tried ...

=> not sure if this equivalent to NO ACTION

here is my actual code for this attribute

In this context we have different relation types like @ManyToOne, @OneToOne, @OneToMany

Any help appreciated

Kind regards
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!