[jboss-cvs] jboss-seam/src/main/org/jboss/seam/framework ...

Peter Muir peter at bleepbleep.org.uk
Thu Aug 16 18:21:02 EDT 2007


  User: pmuir   
  Date: 07/08/16 18:21:02

  Modified:    src/main/org/jboss/seam/framework  HibernateEntityHome.java
  Log:
  One more for JBSEAM-1700
  
  Revision  Changes    Path
  1.17      +9 -1      jboss-seam/src/main/org/jboss/seam/framework/HibernateEntityHome.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: HibernateEntityHome.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/framework/HibernateEntityHome.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- HibernateEntityHome.java	8 Aug 2007 11:37:33 -0000	1.16
  +++ HibernateEntityHome.java	16 Aug 2007 22:21:02 -0000	1.17
  @@ -3,6 +3,7 @@
   import java.io.Serializable;
   
   import org.hibernate.Session;
  +import org.hibernate.TransientObjectException;
   import org.jboss.seam.annotations.Transactional;
   
   /**
  @@ -104,7 +105,14 @@
      @Override
      protected String getEntityName()
      {
  +      try
  +      {
         return getSession().getEntityName(getInstance());
      }
  +      catch (TransientObjectException e) 
  +      {
  +         return getSession().getSessionFactory().getClassMetadata(getInstance().getClass()).getEntityName();
  +      }
  +   }
      
   }
  
  
  



More information about the jboss-cvs-commits mailing list