Sort associated payments by amount so first one always has amount==0
Set "bad" foreign key to be numeric to satisfy SQL adapters