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

        Issue Links

          Activity

          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.
          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
          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.
          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.
          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.
          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 -

          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
          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.
          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.

            People

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

              Dates

              • Created:
                Updated:

                Development