OpenJPA
  1. OpenJPA
  2. OPENJPA-532

SchemaTool performs no function if no pu is found.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      SchemaTools performs no function if no pu is found. It just returns without any message or feedback. E.g.

      c:\> java org.apache.openjpa.jdbc.schema.SchemaTool -ConnectionDriverName com.ibm.db2.jcc.DB2Driver -ConnectionURL jdbc:db2:WSTEST -ConnectionUserName leealber -ConnectionPassword ******** -f schema.out -action reflect

      c:\>

        Activity

        Hide
        Albert Lee added a comment -

        In Configurations.runAgainstAllAnchors() method, all the persistence units (anchors) from the configuration paths are first identified and each anchor is then processed by the tool's runnable class. If no persistence unit is found, this method just returns back to the tool's main().

        For schema and possibly other supported tools, persistence unit is not a required parameter. E.g. schema's -reflect action.

        I have attached a patch of the Configurations class allowing the parent tool to process the original tool semantics if no persistence unit (anchor) is found. In the case of SchemaTool, it will perform the desire function.

        Comments and suggestions are appreciated.

        Thanks,
        Albert Lee.

        Show
        Albert Lee added a comment - In Configurations.runAgainstAllAnchors() method, all the persistence units (anchors) from the configuration paths are first identified and each anchor is then processed by the tool's runnable class. If no persistence unit is found, this method just returns back to the tool's main(). For schema and possibly other supported tools, persistence unit is not a required parameter. E.g. schema's -reflect action. I have attached a patch of the Configurations class allowing the parent tool to process the original tool semantics if no persistence unit (anchor) is found. In the case of SchemaTool, it will perform the desire function. Comments and suggestions are appreciated. Thanks, Albert Lee.

          People

          • Assignee:
            Albert Lee
            Reporter:
            Albert Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development