Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Deleted records while merging

  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !. I have the following problem:
I have two entitites:
A] EntityA
B] EntityB
The relation is EntityA [1 -> *] EntityB.
EntityB represents an state from EntityA. But the problem arise when I try to add an instance of EntityB and merge... Strangely, the EntityB record is not inserted... We have another similar problem like this in our project and we don't have a clue how to fix this... If I wasn't clear, please tell me and I'll give more explanation...

Think the framework is doing some inner work I am not aware... Hope to get this solved...
Virtual Pair Programmers Rep
Posts: 29
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

We'll need to see your entity mappings - either your annotations or your .hbm.xml.

Also, your full entity classes.

Are you using bi-directional or uni-directional for your association?

Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you may need to Check CascadeType on Relationship.
Agustin Ernesto Cardeilhac Banus
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jana reddyMadam & Richard Chesterwood: Really sorry for not answering... But here I am !...
Won't put all my entity code as there are many fields; will only put some...
The relation between these two entities is: 1 to Many between "SOLICITUDES" and "SOLICITUD_ESTADOS".


As seen in the code, I am using bi-drectional for my association... So would it be possible to get a record deleted while executing a merge operation ?...

Thanks for answering... Cheers from Córdoba, Argentina...
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic