[OS-JIRA] Created: (WOL-1093) Entity Modeler - Generate SQL NPE after renaming a relation join attribute

From: John Huss (JIRA) ("John)
Date: Fri Sep 18 2009 - 22:27:01 EDT

  • Next message: John Huss (JIRA): "[OS-JIRA] Created: (WOL-1094) Entity Modeler - Exception in error log when expanding entity in outline view"

    Entity Modeler - Generate SQL NPE after renaming a relation join attribute
    --------------------------------------------------------------------------

                     Key: WOL-1093
                     URL: http://issues.objectstyle.org/jira/browse/WOL-1093
                 Project: WOProject/WOLips
              Issue Type: Bug
              Components: wolips
        Affects Versions: WOLips 3.3.2.* (nightly build please specify)
             Environment: WOLips 3.4.5950
                Reporter: John Huss
                Priority: Minor

    Entity Modeler - Generate SQL NPE after renaming a relation join attribute

    Steps to reproduce
    1) Create two entities to be used in a One to Many relationship, like Invoice and Item
    2) Select the "many" entity in the relationship (Item)
    3) Click new relationship
    4) Select Invoice as the destination and click ok
    5) Save
    6) Rename the generated attribute invoiceID to invoicID
    7) Save
    8) Select the Item entity
    9) Generate SQL
    10) NPE
    11) If you close and re-open the model you see verification failures - "Item: Missing attribute named 'invoiceID' in item" and "Invoice/rel: items - items has a join with a missing attribute"

    java.lang.RuntimeException: Failed to generate SQL.
            at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory$ReflectionSQLGenerator.generateSchemaCreationScript(EOFSQLGeneratorFactory.java:60)
            at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generateSql(GenerateSQLDialog.java:298)
            at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run(GenerateSQLDialog.java:279)
            at java.lang.Thread.run(Thread.java:613)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:592)
            at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory$ReflectionSQLGenerator.generateSchemaCreationScript(EOFSQLGeneratorFactory.java:58)
            ... 3 more
    Caused by: java.lang.NullPointerException
            at com.webobjects.eoaccess.EORelationship.addJoin(EORelationship.java:1380)
            at com.webobjects.eoaccess.EORelationship.awakeWithPropertyList(EORelationship.java:943)
            at com.webobjects.eoaccess.EOEntity.relationships(EOEntity.java:1071)
            at com.webobjects.eoaccess.EORelationship.inverseRelationship(EORelationship.java:555)
            at com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory.foreignKeyConstraintStatementsForRelationship(EOSchemaSynchronizationFactory.java:253)
            at com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory._foreignKeyConstraintStatementsForEntityGroup(EOSchemaSynchronizationFactory.java:958)
            at com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory.schemaCreationStatementsForEntities(EOSchemaSynchronizationFactory.java:903)
            at com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory.schemaCreationScriptForEntities(EOSchemaSynchronizationFactory.java:685)
            at com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationScriptForEntities(EOSynchronizationFactory.java:233)
            at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGenerator.generateSchemaCreationScript(EOFSQLGenerator.java:483)
            ... 8 more

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Fri Sep 18 2009 - 22:27:46 EDT