Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: Short term future
    • Component/s: Core Library
    • Labels:
      None

      Description

      Implement horizontal inheritance. This requires:

      1. Allow dbEntityName attribute to be null in <obj-entity ...>
      2. Modeler changes to allow this to be set. Validation should require that any class set in this way should have at least one subclass.
      3. Changes, particularly to SelectQuery, which accomodates this change and returns the appropriate objEntities.

      1. Proper_attr_creating_typo.patch
        3 kB
        Dzmitry Rusak
      2. Overriding_attributes.patch
        14 kB
        Dzmitry Rusak
      3. modeler_embedded_attributes_fix.patch
        1 kB
        Dzmitry Rusak
      4. inheritance-progress.diff
        27 kB
        Marcin Skladaniec
      5. Inheritance_modeler.patch
        22 kB
        Dzmitry Rusak
      6. icon-override.gif
        0.1 kB
        Dzmitry Rusak
      7. Generate_sql_for_horizontal_inheritance.patch
        34 kB
        Dzmitry Rusak
      8. bugfix_for_attr_table.patch
        1 kB
        Dzmitry Rusak

        Issue Links

          Activity

          Ari Maniatis made changes -
          Issue Type New Feature [ 2 ] Improvement [ 4 ]
          Hide
          Andrus Adamchik added a comment -

          Hi Gilberto,

          just like the last time when you were asking about JPA, here you ran across something on the edges of Cayenne. Unfortunately we dropped the ball on horizontal inheritance in 3.0 due to the lack of time by people who could make it happen (the implementation is rather deep and involved). I very much like to revive this effort in 3.1 beyond a few Modeler patches that we have in place so far. It is in my queue right after the new DI stuff.

          Show
          Andrus Adamchik added a comment - Hi Gilberto, just like the last time when you were asking about JPA, here you ran across something on the edges of Cayenne. Unfortunately we dropped the ball on horizontal inheritance in 3.0 due to the lack of time by people who could make it happen (the implementation is rather deep and involved). I very much like to revive this effort in 3.1 beyond a few Modeler patches that we have in place so far. It is in my queue right after the new DI stuff.
          Hide
          Gilberto C Andrade added a comment -

          Hi, how can I test this feature?
          What does/doesn't work?
          Is there any docs on the issue?
          Thanks.

          Show
          Gilberto C Andrade added a comment - Hi, how can I test this feature? What does/doesn't work? Is there any docs on the issue? Thanks.
          Ari Maniatis made changes -
          Workflow jira [ 12456879 ] Cayenne workflow [ 12487546 ]
          Henri Yandell made changes -
          Project Import Sat Mar 21 00:51:04 PDT 2009 [ 1237621864637 ]
          Andrus Adamchik made changes -
          Link This issue is referenced by CAY-1141 [ CAY-1141 ]
          Andrus Adamchik made changes -
          Link This issue references CAY-1140 [ CAY-1140 ]
          Andrus Adamchik made changes -
          Link This issue references CAY-1136 [ CAY-1136 ]
          Ari Maniatis made changes -
          Fix Version/s Short term future [ 10125 ]
          Fix Version/s 3.0 [ 10091 ]
          Dzmitry Rusak made changes -
          Attachment Generate_sql_for_horizontal_inheritance.patch [ 10770 ]
          Andrus Adamchik made changes -
          Attachment Unit_tests_for_horizontal_inheritance.patch [ 10752 ]
          Andrus Adamchik made changes -
          Attachment Select_union.patch [ 10763 ]
          Andrus Adamchik made changes -
          Attachment Select_union_fixed.patch [ 10764 ]
          Dzmitry Rusak made changes -
          Attachment Select_union_fixed.patch [ 10764 ]
          Dzmitry Rusak made changes -
          Attachment Select_union.patch [ 10763 ]
          Andrus Adamchik made changes -
          Assignee Ari Maniatis [ ari ] Andrus Adamchik [ andrus ]
          Hide
          Andrus Adamchik added a comment -

          let me grab this issue , as I am reviewing and applying patches from Dzmitry

          Show
          Andrus Adamchik added a comment - let me grab this issue , as I am reviewing and applying patches from Dzmitry
          Dzmitry Rusak made changes -
          Attachment Unit_tests_for_horizontal_inheritance.patch [ 10752 ]
          Dzmitry Rusak made changes -
          Attachment Proper_attr_creating_typo.patch [ 10751 ]
          Dzmitry Rusak made changes -
          Dzmitry Rusak made changes -
          Attachment bugfix_for_attr_table.patch [ 10746 ]
          Andrus Adamchik made changes -
          Attachment Inheritance_modeler.patch [ 10743 ]
          Dzmitry Rusak made changes -
          Attachment icon-override.gif [ 10745 ]
          Dzmitry Rusak made changes -
          Attachment Inheritance_modeler.patch [ 10744 ]
          Dzmitry Rusak made changes -
          Attachment Inheritance_modeler.patch [ 10743 ]
          Hide
          Dzmitry Rusak added a comment -

          Add necessary changes in modeler.

          Show
          Dzmitry Rusak added a comment - Add necessary changes in modeler.
          Hide
          Andrus Adamchik added a comment -

          I applied the last Dzmitry's patch with only cosmetic changes. Now we need to address a few modeler issues with overriden attributes, before moving to runtime implementation.

          Show
          Andrus Adamchik added a comment - I applied the last Dzmitry's patch with only cosmetic changes. Now we need to address a few modeler issues with overriden attributes, before moving to runtime implementation.
          Andrus Adamchik made changes -
          Attachment Overriding_attributes.patch [ 10738 ]
          Andrus Adamchik made changes -
          Attachment Overriding_attributes.patch [ 10736 ]
          Dzmitry Rusak made changes -
          Attachment Overriding_attributes.patch [ 10739 ]
          Dzmitry Rusak made changes -
          Attachment Overriding_attributes.patch [ 10738 ]
          Hide
          Dzmitry Rusak added a comment -

          Move code for encoding overridden attribute from ObjAttribute to ObjEntity.

          Show
          Dzmitry Rusak added a comment - Move code for encoding overridden attribute from ObjAttribute to ObjEntity.
          Dzmitry Rusak made changes -
          Attachment Overriding_attributes.patch [ 10736 ]
          Hide
          Dzmitry Rusak added a comment -

          Add possibility to "override" attribute - change dbpath.

          Show
          Dzmitry Rusak added a comment - Add possibility to "override" attribute - change dbpath.
          Ari Maniatis made changes -
          Link This issue is referenced by CAY-1090 [ CAY-1090 ]
          Marcin Skladaniec made changes -
          Attachment inheritance-progress.diff [ 10717 ]
          Hide
          Marcin Skladaniec added a comment -

          Hi
          I have tried to implement simple version of inheritance where there is a single abstract entity without a dbEntity, and two subclasses of this abstract entity with dbEntities.
          As for now i can commit new objects, but I cannot fetch. My debugging lead me to the SelectTranslator.java where I can see a correct number of RawDataRows being fetched, but when it is time to fault the rows into entities all falls apart. The persistent objects are created, but they always stay in HOLLOW state.
          I have tried to find the reason of this which this is happening, no luck so far. I'll attach diff of my working copy in a moment, maybe someone else can pick this up and see what am I doing wrong.

          Show
          Marcin Skladaniec added a comment - Hi I have tried to implement simple version of inheritance where there is a single abstract entity without a dbEntity, and two subclasses of this abstract entity with dbEntities. As for now i can commit new objects, but I cannot fetch. My debugging lead me to the SelectTranslator.java where I can see a correct number of RawDataRows being fetched, but when it is time to fault the rows into entities all falls apart. The persistent objects are created, but they always stay in HOLLOW state. I have tried to find the reason of this which this is happening, no luck so far. I'll attach diff of my working copy in a moment, maybe someone else can pick this up and see what am I doing wrong.
          Hide
          Ari Maniatis added a comment -

          It was agreed that for the first cut of this feature, it would be simpler to implement just abstract superclass implementations of horizontal inheritance. That is by far the most common scenario and avoids certain potential issues which would need to be checked for.

          Show
          Ari Maniatis added a comment - It was agreed that for the first cut of this feature, it would be simpler to implement just abstract superclass implementations of horizontal inheritance. That is by far the most common scenario and avoids certain potential issues which would need to be checked for.
          Ari Maniatis made changes -
          Field Original Value New Value
          Link This issue references CAY-794 [ CAY-794 ]
          Ari Maniatis created issue -

            People

            • Assignee:
              Andrus Adamchik
              Reporter:
              Ari Maniatis
            • Votes:
              6 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Development