User: dsundstrom
  Date: 02/04/09 13:41:24

  Modified:    src/main/org/jboss/ejb/plugins/cmp/jdbc
                        JDBCStartCommand.java
  Log:
  Fixed bug [ 530437 ] Intra-Bean Many to Many auto-gen broken.
  
  Revision  Changes    Path
  1.23      +5 -3      
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStartCommand.java
  
  Index: JDBCStartCommand.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStartCommand.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JDBCStartCommand.java     26 Feb 2002 23:53:06 -0000      1.22
  +++ JDBCStartCommand.java     9 Apr 2002 20:41:24 -0000       1.23
  @@ -40,7 +40,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Joe Shevland</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Justin Forder</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Michel de Groot</a>
  - * @version $Revision: 1.22 $
  + * @version $Revision: 1.23 $
    */
   public class JDBCStartCommand {
   
  @@ -118,7 +118,9 @@
               addForeignKeyConstraint(cmrField);
   
               // Create related fk constraint
  -            addForeignKeyConstraint(cmrField.getRelatedCMRField());
  +            if(!entity.equals(cmrField.getRelatedJDBCEntity())) {
  +               addForeignKeyConstraint(cmrField.getRelatedCMRField());
  +            }
            }
         }
      }
  @@ -166,7 +168,7 @@
         } catch(Exception e) {
            log.debug("Could not create table " + tableName);
            try {
  -            manager.getContainer().getTransactionManager().rollback ();
  +            manager.getContainer().getTransactionManager().rollback();
            } catch(Exception _e) {
               log.error("Could not roll back transaction: ", e);
            }
  
  
  

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

Reply via email to