Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-958

cgen ant task generates nonsense if superpkg attribute is missing, should fail instead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0
    • None
    • None
    • should not matter, but XP SP2 with all latest, sun java 1.6.0_03

    Description

      with the 3.0M2 Cayenne distro, this ant task:

      <cgen map="${db.map}" destdir="${src.dir}" overwrite="false" encoding="UTF-8" version="1.2"/>

      generates classes with "package null" thus placing superclasses (classes with underscore) in the source root.

      If I change it to:

      <cgen map="${db.map}" destdir="${src.dir}" overwrite="false" encoding="UTF-8" version="1.2"
      superpkg="com.mycompany.schema"/>

      Then it all works. The UI tool generates classes with the same maps just fine. Something is missing here:

      1. If the package happens to be null then the task should fail instead of completing normally with a hint of what's wrong.
      2. Should not the package be taken from the map file, from at least

      <property name="defaultPackage" value="com.mycompany.schema"/>
      ?

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            m.b Michael Bergens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: