1 Reply Latest reply: Apr 27, 2012 8:39 AM by 774570 RSS

    Creating Source for Interface - Using API

    933107
      Need to create source for newly created interface using API.

      Tried with below code, getting below error

      During synchronization a new object was found through a relationship that was not marked cascade PERSIST:

      Please help on this, Thanks.

      Below is my code component,


                                         List <DataSet> ds = next_intr.getDataSets();
                                         Iterator <DataSet> itr = ds.iterator();
                                         DataSet ds_nxt1 = itr.next();
                                         String ds_name = ds_nxt1.getName();
                                         if(ds_name.equalsIgnoreCase(ds_nxt.getName()))
                                         {
                                              Collection <SourceDataStore> ds_sources = ds_nxt.getSourceDataStores();
                                              ds_nxt1.addSourceDataStore(ds_sources.iterator().next());
      }