We are unable to see how, in any aspect of the facts of this case, the plaintiffs can recover. There is no evidence that the plaintiffs performed the services sued for upon the credit of the defendant, or that she entered into a several contract with them. The facts stated, if they show any contract by the defendant, show a joint contract by herself and her husband. Upon such a contract the plaintiffs could not maintain this action. The judgment which he has taken against one of the joint debtors is a bar to any future action against the other. Ward v Johnson, 13 Mass. 148. Gibbs v. Bryant, 1 Pick. 118.
But the true inference to be drawn from the facts stated undoubtedly is, that the plaintiffs contracted with, and gave credit *180to, John J. Davis; and they now claim that he was acting as the agent of the defendant and that they gave him credit in ignorance of this fact. If we assume that he was acting as her agent in contracting with the plaintiffs, yet there is an insuperable obstacle to their right to maintain this action. The general principle is' undisputed, that, when a person contracts with another who is in fact an agent of an undisclosed principal, he may, upon discovery of the principal, resort to him, or to the agent with whom he dealt, at his election. But if, after having come to a knowledge of all the facts, he elects to hold the agent, he cannot afterwards resort to the principal. In the case at bar, it is admitted that the plaintiffs, after all the facts became known to them, obtained a judgment against John J. Davis upon the same cause of action for which this suit is brought. We are of opinion that this was conclusive evidence of an election to resort to the agent, to whom the credit was originally given, and is a bar to this action against the principal. Raymond v. Crown & Eagle Mills, 2 Met. 319.
Judgment for the defendant.