Skip Headers

# Setter Parameter Type Checking

Previous

Next

To make TopLink verify that the parameters to one-to-one and one-to-many relationship setters are of the same type as the corresponding CMR field, set system property `toplink.cts.collection.checkParameters` to a value of `true` (not case sensitive). If the setters are not the same type, then TopLink throws a `java.lang.IllegalArgumentException`.

Note: Setting this property to `true` will affect performance. Use this setting only if necessary.

If you set the property to `false` (the default value), TopLink does not make this verification. In this case, it is up to your application to make sure the parameters are of the correct type.

For more information, see the EJB 2.1 specification, section 10.3.6.