There are two copy constructors in each of OracleConnectOptions and MSSQLConnectOptions:
- one which takes another instance of the corresponding type
- one which takes any instance of the parent type
SqlConnectOptions
In the second constructor, we should check if the copied object is of the same type and, in this case, copy all the fields, not just the fields of the parent.
An example of this issue: if you put OracleConnectOptions having a serviceId field in a SqlConnectOptions reference, then call the OracleConnectOptions copy constructor using this reference, the resulting OracleConnectOptions will miss the serviceId field.
There are two copy constructors in each of
OracleConnectOptionsandMSSQLConnectOptions:SqlConnectOptionsIn the second constructor, we should check if the copied object is of the same type and, in this case, copy all the fields, not just the fields of the parent.
An example of this issue: if you put
OracleConnectOptionshaving aserviceIdfield in aSqlConnectOptionsreference, then call theOracleConnectOptionscopy constructor using this reference, the resultingOracleConnectOptionswill miss theserviceIdfield.