Forums Register Login

Deleted records while merging

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
you may need to Check CascadeType on Relationship.
+Pie Number of slices to send: Send
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...
Get off me! Here, read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 682 times.
Similar Threads
Question from SUN's ejb quiz
toString() and Comparable<T> on a JAXB generated entity class
EJBQL questions
How Do Foriegn Key Objects in JPA get Initialised?
How to code: A->B using BMP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:46:17.