Fix mising connection parameter to schema objects.

When calling create/update the created schema object should be passed
the current connection.

Fixes #2668