hibernate question ?

Discussion in 'Java' started by tomo, Jun 11, 2010.

  1. tomo

    tomo Guest

    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.
     
    tomo, Jun 11, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilias Lazaridis
    Replies:
    0
    Views:
    1,748
    Ilias Lazaridis
    Dec 27, 2004
  2. Replies:
    0
    Views:
    3,751
  3. jstorta
    Replies:
    1
    Views:
    11,808
  4. Eleanna Skouta
    Replies:
    2
    Views:
    8,469
    Arne Vajhøj
    Dec 9, 2008
  5. Amit Jain
    Replies:
    7
    Views:
    3,336
    Amit Jain
    Apr 27, 2009
Loading...

Share This Page