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

Attribute overrides in SelectTranslator are broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0M5
    • Undefined future
    • Core Library
    • None

    Description

      CAY_207Test seems to succeed only by coincidence. When I am running it standalone from Eclipse, it fails; when it is run as a part of the test batch, it succeeds (also work done locally on some other issues, reshuffled something in the mapping, so the tests started failing even in batch mode)....

      CAY_207Test.java:

      Manager o1 = DataObjectUtils.objectForPK(context, Manager.class, 1);
      assertTrue(o1 instanceof CAY_207Manager1);

      Object p1 = o1.readProperty("clientContactType");
      assertNotNull(p1); // this fails

      Looks like SelectTranslator.appendColumn(..) is at fault. It does not handle correctly multiple ObjAttributes from peer entities in the same inheritance hierarchy , always forcing VOID type on all but one subclass (which one is really random and depends on mapping internals). So this results in a NULL value returned for the affected subclasses.

      Attachments

        Issue Links

          Activity

            People

              andrus Andrus Adamchik
              andrus Andrus Adamchik
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: