User: dsundstrom
  Date: 02/04/11 09:39:20

  Modified:    src/main/org/jboss/ejb/plugins/cmp/jdbc
                        JDBCRemoveEntityCommand.java
  Log:
  Fixed bug [ 536502 ] CMR Cascade Delete Fails.
  
  This was due to createing the wrong pk class when loading a foreign key.
  
  Revision  Changes    Path
  1.15      +9 -11     
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCRemoveEntityCommand.java
  
  Index: JDBCRemoveEntityCommand.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCRemoveEntityCommand.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JDBCRemoveEntityCommand.java      13 Feb 2002 02:35:08 -0000      1.14
  +++ JDBCRemoveEntityCommand.java      11 Apr 2002 16:39:20 -0000      1.15
  @@ -31,7 +31,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Joe Shevland</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Justin Forder</a>
  - * @version $Revision: 1.14 $
  + * @version $Revision: 1.15 $
    */
   public class JDBCRemoveEntityCommand {
      
  @@ -62,21 +62,19 @@
      
      public void execute(EntityEnterpriseContext context)
            throws RemoveException {
  -      
  +
         // remove entity from all relations
         HashMap oldRelations = removeFromRelations(context);
   
         // update the related entities (stores the removal from relationships)
         if(!entity.getCMRFields().isEmpty()) {
  -      try
  -      {
  -         manager.getContainer().synchronizeEntitiesWithinTransaction(
  -            context.getTransaction());
  -      }
  -      catch (TransactionRolledbackException tre)
  -      {
  -         throw new RemoveException("Transaction rolled back, cannot remove in tx");
  -      }
  +         try {
  +            manager.getContainer().synchronizeEntitiesWithinTransaction(
  +                  context.getTransaction());
  +         } catch(TransactionRolledbackException tre) {
  +            throw new RemoveException("Transaction rolled back, cannot " +
  +                  "remove in tx");
  +         }
         }
         
         Connection con = null;
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to