hibernate question ?

T

tomo

I have a an entity parent A, and it has a Set od entity-s B. Entity B
has custom hibernate annotation
all-delete-orphan. Let's say that I have one parent A in DB, and 10 B in
db. When I delete one
entity in set, and write entityManager.merge(A) it deletes that child
record in db,and that's great, but
the problem is that I have a sitauation where I have one parent(A) in
db, which has 20000 child records,
and where i delete one of 20000 records and write entityManager.merge(A)
it run's out of memory.
Any suggestions how to solve that ?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top