0 Replies Latest reply on Oct 23, 2007 5:05 AM by Krunoslav Samardzic

    Class enhanced by javassist to normal Entity

    Krunoslav Samardzic Newbie

      I am using Jboss 4.2 with seam.
      I have a problem. I need to convert entity that has been lazy fetched to it's original class, so I can persist it. Trying to persist entity that is lazy fetched (enhanced by javassist) would cause exception.
      I have this problem because I can not declare persist cascade between main entity and sub entities which are lazily fetched. ( project tracks historical data, and unfortunately database does not have triggers )
      I have managed to solve problem by using hibernate session

       SubEntity sub= manager.find(SubEntity.class,main.getSubEntity().getId());

      But this kind of solution is not acceptable because then I am tide to jboss and hibernate, ( It is imperative that I have ability to move code to another application server)
      Please help.
      Thanks in advance Kruno.