On development environment i've manually (from sql) create VIEW. On Pega side I've create class and Database Table for this view and map everything.
So when I will decide to move my changes from development to testing enviroment - what should I do? Only incude in product rule Database Table instance and this view will be created on test env automaticaly? Or I should execute my CREATE VIEW script on test env manually?
In what cases Pega create database objects automatically on importing of RAP file and when we need to execute scripts manually?
When ever you are planning to move pega related data/rule objects then you have to use product rule.
As SP is not pega rule, you need to execute CREATE VIEW script on test env manually.
Else, create connect-sql rule and keep the script in it. Move that connect-SQL rule in the product. Please proceed like this when you don't have any other approach to follow as it is not recommended one.