Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deleted records while merging

 
Agustin Ernesto Cardeilhac Banus
Greenhorn
Posts: 9
  • 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...
Cheers
 
Richard Chesterwood
Virtual Pair Programmers Rep
Greenhorn
Posts: 29
7
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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?

Thanks,
Richard.
 
Jana reddyMadam
Greenhorn
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
Greenhorn
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".



[FROM "SOLICITUD_ESTADOS" Entity]


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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic