*460 Opinion
Sаn Diego Wholesale Credit Men’s Association (petitioner) seeks a writ of mandamus compelling the superior court to order the clerk of that court to issue a writ of attachment in an action brought by petitioner against International Hotels Construction and Management, Inc. (International), real party in interest.
The hearing on the application for the writ was held on August 2, 1973. An order denying the application was filed August 7.
The complaint, in two causes of action, was upon the claim of Don H. Walters, doing business as Aluminum Tube Railing Company (Aluminum), in the amount of $40,211.56', for goods and services furnished to International for the construction of a hotel building, and the claim of Inter-City Soils, Inc., for soil testing on the same project, in the amount of $1,972. Both claims were assigned to рetitioner for collection, with an authorization to file suit.
The statutes governing the issuance of prejudgment writs of attachment were amended substantially in 1972. Except as provided in Code of Civil Procedure section 538.5, the writ is to issue only upon a hearing had after notice given. (Code Civ. Proc., §§ 538.1, 538.2, 538.4.)
The writ may issue for the attachment against any corporation organized under the general corporation law in an action for a liquidated sum of money based upon a contract, express or implied, for: “(3) The sale . . . of . . . personal property (including . . . goods sold and delivered on open account); or
“(4) Services rendered, if the claim is not secured by any mortgage, deed of trust or security interest on real or personal property or, if originally so secured, such security has, without any act of the plaintiff, or the person to whom the security was given, become valueless.” (Code Civ. Proc., § 537.1.)
After the service of the required notice of hearing: “If the defendant does not appеar at the hearing, in person or by counsel, the court, without taking further evidence, shall direct the clerk to immediately issue a writ of attachment. ... If the court finds on the basis of a preponderance of the evidence that grounds for the issuancе of an attachment exist and that the plaintiff has established the probable validity of his claim and the absence of any reasonable probability that a successful defense can be asserted by the defendant, the court shall direct the clerk to immediately issue a writ of attachment . . . .” (Code Civ. Proc., § 538.4.)
*461 At the hearing in the trial court upon petitioner’s application, there were before the court the affidavits of Aluminum and International, oral testimony received by the court, and certain exhibits in writing.
In this proceeding, International states that the issues before the trial court were: (1) whether the assignment by Aluminum to petitioner was in breach of a claimed condition against assignment; (2) whether the claim sued upon had been secured by the statutory right tо a mechanic’s lien which was lost due to the fault of the assignors; and states the amount of the claim was not in issue. International states further that the first issue was disposed of by a factual determination in the trial court that Aluminum had not agreed to any condition against the assignability of its right to receive payment of the amount owing by International; and by the trial court’s ruling that such a condition, had it been agreed upon, was not violated by an assignment for collection.
We consider first whether this is a proper case for issuance of a writ to the trial court.
Code of Civil Procedure section 904.1 authorizes an appeal from an order discharging or refusing to discharge an attachment, and its predecessor, section 937, authorized an appeаl from an order dissolving or refusing to dissolve an attachment.
Here we are dealing with an order denying an application for a prejudgment attachment under a procedure set up for the first time by legislation enacted in 1972. Theretofore the writ wаs issued by the clerk without a court order. Code of Civil Procedure section 904.1, last amended in 1970, contains no provision for appeal from an order denying an attachment.
It is true the order subject to this review vacated the restraining order dated July 18 which in any event would have terminated not more than 30 days after that date by virtue of Code of Civil Procedure section 538.3. 1
Although a right of appeal existed from an order discharging an attachment, the court in
Hill
v.
Superior Court,
Similarly, the writ of mandamus has issued to compel the dissolution of an illegаlly obtained attachment. (Alexander v.
Superior Court,
The hearing of the application for the writ of attachment is entitled to preference over other matters not of the same nature. (Code Civ. Proc., § 538.4.)
The nature of the remedy is such that undue delay in obtaining it may defeat the purpose of the remedy. The writ of attachment might issue even' if the court had previously vacated a restraining order because the court was satisfied there was no danger that sufficient property of the defendant would nоt be available to secure the plaintiff’s claim should the writ of attachment be issued. (Code Civ. Proc., § 538.3.)
There is no statutory right of appeal from an order denying an application for a writ of attachment. 2
This, therefore, is a proper case in which to entertain a petition for the writ.
We have concluded that the ancillary remedy of attachment is available to a creditor entitled to recover under a contract with the owner of property against which the creditоr might also have claimed a mechanic’s lien, but did not. 3
The exclusion of a secured contract from the right to an attachment is declared by Code of Civil Procedure section 537 in the following language: “[W]here the contract ... is not secured by any mоrtgage, deed of trust or lien upon real or personal property, or any pledge of personal property, *463 or, if originally so secured, such security has, without any act of the plaintiff, or the person to whom the security was given, become valueless . . . .” Such has been the language of the section at least since 1933 and will continue to be its language under the amendment to be effective January 1, 1975.
Section 537.1, added in 1972, further defines the contracts, ref erred to in section 537, and uses the word “claim” rather than contract in the exclusionary clause. Since, under section 537, the claim must still be based upon a contract, express or implied, we attach no particular significance to the use of the word “claim” in section 537.1.
When Cоde of Civil Procedure section 537.1 was added in 1972, Civil Code section 3152 read and now reads: “Nothing contained in this title shall be construed to impair or affect the right of any claimant to maintain a personal action to recover his debt against the рerson, liable therefor either in a separate action or in the action to foreclose his lien, nor any right he may have to the issuance of a writ of attachment or execution. In his affidavit to procúre an attachment he need not state that his demand is not secured by a hen. The judgment, if any, obtained by the plaintiff in such personal action, or personal judgment obtained in such mechanics’ lien action, shall not impair or merge any Hen held by the plaintiff under this chapter, but any monеy collected on such judgment shall be credited on the amount of such lien.”
An identically worded provision was found in Code of Civil Procedure section 1200, added in 1951 and now repealed; and before 1951 a similar provision allowing attachment was found in Codе of Civil Procedure section 1197.
In discussing the reason for the enactment of such a provision, the court in
Wm. J. Bettingen Lumber Co.
v.
Kerrin, 99
Cal.App. 686, 690 [
We are not required to go so far, since petitioner’s assignors did not attempt to perfect the liens tо which Civil Code section 3110 states they were entitled.
We need not decide whether, in strictness, it could be said that a mechanic’s lien secures a contract for the direct payment of money for labor - or materials furnished in the improvement of рroperty of the other contracting party, since the lien may attach regardless of the existence of a direct contract with the property owner and the amount of the liens is not necessarily limited to the contract price where there is a general contract. The language of Civil Code section 3152 is clear, and we find no manifestation of a legislative intent by the 1972 addition of Code of Civil Procedure section 537.1 to avoid the effect of Civil Code section 3152 since in seсtion 537 the specific language dealing with secured contracts remains unchanged.
The trial court shall direct the clerk to issue the writ of attachment, if the defendant does not appear at the hearing in person or by counsel, or if, upon thе basis of the evidence introduced at the hearing, the court finds by a preponderance of the evidence that the conditions for issuance of the writ exist and that the defendant probably cannot defend successfully. (Code Civ. Proc., § 538.4.) The evidеnce presented to the trial court here was such that the court could not have found other than that statutory grounds for issuance of an attachment existed, that the plaintiff had established the probable validity of its claim, and that there was absеnt any reasonable probability that a successful defense could be asserted.
When the trial court has a clear legal duty to grant certain relief, it is an abuse of its discretion to refuse such relief, and mandate will lie to compel the performance of the clear legal duty.
(Pacific Indem. Co.
v.
Superior Court,
The defense based upon the theory the writ of attachment may not issue in favor of a creditor who might have claimed a lien as a materialman but did not do so presents purely a question of law. Since thе theory is false, the court should have directed the issuance of the writ.
The petition filed with this court, the answer thereto by the real parties
*465
in interest, and the briefs of petitioner and the real parties in interest, fully present the determinative issues in the рremises. An alternative writ or order to show cause would add nothing to the full presentation already made. A peremptory writ is proper (Code Civ. Proc., § 1088;
Goodenough
v.
Superior Court,
Let a writ issue directing the Superior Court in and for thе County of San Diego to set aside its order denying a prejudgment writ of attachment and to enter its order directing the clerk of said court to issue a writ of attachment in superior court action No. 344638.
Ault, J., and Cologne, J., concurred.
Notes
Code of Civil Procedure section 538.3 provides in pаrt: “The temporary restraining order shall expire by its terms unless a writ of attachment is issued and levied within 30 days after the service of the order or if the defendant gives an undertaking as provided in Section 555 in the amount of plaintiff’s claim as security for the payment of any judgment recovered by the plaintiff.”
That may be the result of a legislative oversight which may be corrected.
In the trial court the owner of Aluminum testified he did not file a lien claim because of prior satisfactory business dealings with International. He had not been requested not to claim a lien.
