When declaratory relief is sought, all persons having or claiming any interest which would be affected by the declaration shall be made parties to the proceeding.

L.1951 (1st SS), c.344.