Several persons may be joined as defendants in an action for the causes specified in ORS § 30.510 (1), and in such action their respective rights to such office or franchise may be determined.