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

Missing flush method in DataSource interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • V2 2.0.8
    • None
    • odata2-annotation
    • None

    Description

      Hi,

       

      We are using olingo in our project for consuming oData.

      As entities are created using annotations so we have a class which implements org.apache.olingo.odata2.annotation.processor.core.datasource.DataSource.

      When I looked at the interface methods, I saw that there is no save/flush method available.So if we want to save the odata content to some persistence provider then it should be done within method createData. Just wondering if odata received is of multi level content, for example Employee->Employee_Details->Address, then  createData would be called 3 times for each entity, if there is any issue in Address then the first 2 entites are already persisted which is wrong. Here all the 3 entities should be persisted at a time.

      There is one more method writeRelation, in this method if there is any issue and if we don't want to persist the odata entities then we can't do that as save is already triggered in createData.

      Could you please tell me is there any way we can achieve the above behavior or my understanding is wrong?

       

      Thanks,

      Kitty 

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            kitty18 kitty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: