If you ignore the prompt and continue the refactoring, the following error information will popup:
Error occured during the refactoring of <view_name>java.lang.NullPointerException
at com.sap.ndb.studio.modeler.job.type.copymodels.MoveModelsHandler.updateReferences(MoveModelsHandler.java)
at com.sap.ndb.studio.modeler.job.type.copymodels.MoveModelsHandler.moveModels(MoveModelsHandler.java)
at com.sap.ndb.studio.modeler.job.type.copymodels.RefactorModelsJob.moveModels(RefactorModelsJob.java)
at com.sap.ndb.studio.modeler.job.type.copymodels.RefactorModelsJob.refactor(RefactorModelsJob.java)
at com.sap.ndb.studio.modeler.job.type.copymodels.RefactorModelsJob.run(RefactorModelsJob.java)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java)
Environment
HANA database 1.0 all releases
Reproducing the Issue
On HANA Studio, find out your view, Right click it -> Refactor -> Move, in popup window, choose the target package that you would move to, then click "Next".
Cause
This problem is usually caused by one of the following reasons:
Resolution
If you make sure that the referential view won't be used anymore, you need firstly check if the referential view or the referencing relationship is still existing in system views. You can use the following SQL statements for checking:
SELECT * FROM "_SYS_REPO"."INACTIVE_OBJECT" WHERE package_id = '<package name>' AND object_name = '<referential view>';
SELECT * FROM "_SYS_REPO"."INACTIVE_OBJECTCROSSREF" WHERE from_package_id = '<package name>' AND from_object_name = '<referential view>';
Delete the unwanted entries using SQL commands:
DELETE FROM "_SYS_REPO"."INACTIVE_OBJECT" WHERE package_id = '<package name>' AND object_name = '<referential view>';
DELETE FROM "_SYS_REPO"."INACTIVE_OBJECTCROSSREF" WHERE from_package_id = '<package name>' AND from_object_name = '<referential view>';
Then you can retry to refactor the primary view.