First, you found a bug. Thanks for the work :). This option is broken for constraint in 6.2. I will log this.
I understand the problem of when to have the schema and when not to. I’m thinking about what you suggested. Can we call it like “Only for distinct schema” and as a sub option of “Prefix with Schema name”? In this way, things will work like:
Prefix with schema name - ON
1). Only for distinct schema - OFF
a. the object to be created - add schema
b. the objects being referenced - add schema
2). Only for distinct schema - ON
c. the object to be created - no schema
d. the objects being referenced
d1. objects having the same schema like the object to be created has - no schema
d2. objects having different schemas from the owner of the object to be created - add schema
Prefix with schema name - OFF
never add schema for any object
CREATE SYNONYM user2.object2 FOR user1.object1;
here, object2 is the object to be created; user2 is the owner of the object to be created; object1 is an object being referenced; user1 is the schema of the object being referenced. So when the new preference “Only for distinct schema” is ON, the DDL will be:
CREATE SYNONYM object2 FOR user1.object1;
I don’t think we need to take care of what current logon user is. Because we don’t know where the DDL will be used.
This is pretty all I think of for now. Would this meet what you suggested? Please let me know if you have any other idea.