Uploaded image for project: 'OJB'
  1. OJB
  2. OJB-43

Persistent inner classes and xdoclet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.3
    • 1.0.x CVS, 1.1 CVS
    • None
    • None

    Description

      To reference an inner class, xdoclet requires it to be referenced as Outer.Inner while OJB requires it to be referenced as Outer$Inner. This makes it impossible to get a correct mapping using the xdoclet plugin. Here's a truncated example that demonstrates the problem:

      /**

      • @ojb.class
        */
        public class History {
        /**
      • @ojb.class
        */
        public static class Change { // change log info... }

      /**

      • @ojb.collection foreignkey="..."
      • element-class-ref="...History$Change"
        */
        private List changes;
        }

      xdoclet will report "Collection changes in class ...History references an unknown class ...History$Change." Replacing the '$' with a '.' will allow xdoclet to generate the mapping, but OJB will fail to load the repository, reporting a ClassNotFoundException for ...History.Change. The repository_user.xml needs to be manually editted after generation by xdoclet.

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            laurie Laurie Harper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: