Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    JPA2DataSource child relationship abstraction

    Let me start by showing you the entity model:

    1. VideoStream.java

    VideoStreamGenerated.java


    VideoStreamLive.java


    VideoStreamArchived.java


    VideoStreamDestination.java


    VideoStream_JPA.ds.xml


    VideoStreamGenerated_JPA.ds.xml


    VideoStreamLive_JPA.ds.xml


    VideoStreamDestination_JPA.ds.xml


    Given this setup, I can fetch against VideoStream_JPA.ds.xml and the results will actually contain all of the values from the concrete VideoStream implementation. Which is highly desirable. However, when I fetch from VideoStreamDestination_JPA.ds.xml the child stream only contains the fields specifically declared in VideoStream_JPA.ds.xml and not the fields from the concrete VideoStream implementation.
    Is there a mechanism where I can easily have it return the actual concrete classes fields in the child entity? In our use case, there are actually 3 concrete implementations of VideoStream.java, and I would like to be able to return all destinations that belong to a user in a single fetch, but I need the concrete VideoStream class to work with on the client.

    Your help is greatly appreciated.
    Last edited by jpappalardo; 24 Sep 2014, 09:10.

    #2
    Is there something similar to dropExtraFields="false"
    for a child relationship? JPA must have the concrete class in the relationship since it cannot create an abstract VideoStream, so is there some mechanism to get all of the properties back to the client?

    Comment


      #3
      It's not obvious why this isn't working for you at a glance. We've assigned a developer to take a deeper look and will respond when we have more information for you.

      Thanks
      Isomorphic Software

      Comment


        #4
        This is fixed now, you can download next nightly build (2014-04-11) and try it out. Fix is ported to 4.1 version as well, let us know if you use different version.

        Within your setup fetching against VideoStreamDestination_JPA data source will now work as expected, i.e. all fields of VideoStream and concrete implementation (VideoStreamLive or VideoStreamArchived) will be sent to the client.

        Such behavior is caused by dropExtraFields=false data source setting. Note that for this exact fetch scenario dropExtraFields=false setting is needed only for root VideoStream_JPA data source.
        Last edited by Isomorphic; 10 Apr 2014, 09:01.

        Comment


          #5
          Thank you kindly

          Comment

          Working...
          X