Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-895

Support for @VirtualAccess

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • V2 2.0.7, V2 2.1.0
    • odata2-jpa
    • None
    • Important

    Description

      JPA entities annotated with @VirtualAccess do not have explicit setters/getters for each attributes rather an generic get(propertyName), set(value,propertyName).
      This allows for dynamic extensibility at runtime, like dynamic mapping of new columns to existing entities or even dynamic mapping of new tables/views.

      For example:

      EclipseLink provides dynamic mapping of a DB table/view as explained in the wiki below
      https://wiki.eclipse.org/EclipseLink/Examples/JPA/Dynamic#Dynamic_Configuration_using_API

      Design details : http://wiki.eclipse.org/EclipseLink/Development/Dynamic

      In cloud world this provides lot of flexibility as each tenant can have their own extensions of the data model which needs to be exposed via OData APIs and with this feature one can build a generic code which can handle these tenant specific extensions.

      But currently Olingo JPA processor expects the JPA Entity POJO to have named setters and getters only.

      This needs to be enhanced to support the generic get(propertyName) and set(propertyName, value) type of POJOs thus enabling the framework consumer to tap into the dynamic JPA extensibility.

      A basic support for this would go a long way, as currently without meddling with the JPA processor code it would not be possible to support this feature.

      Attachments

        Issue Links

          Activity

            People

              chrisam Christian Amend
              snagendra@gmail.com Nagendra
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: