search for: loan_id

Displaying 1 result from an estimated 1 matches for "loan_id".

Did you mean: load_id
2006 Oct 12
2
How do I test a unique index?
...d, and each payment has a payment_number unique within that loan. For example, Loan A can have payment_numbers 0, 1, and 2 and Loan B can have payment_numbers 0, 1, 2, and 3 (but only one of each payment_number). I can enforce this with a unique index in the payments table on the combination of loan_id and payment_number. How do I enforce this in my model? When I run a unit test with just the index set I get a "Mysql::Error: #23000Duplicate entry...". I would like to have something like a validates_uniqueness_of on the combination of loan_id and payment_number. How do I do that? T...