Expand Index struct to also get the original field name
This is needed in postgres, since we store data as jsonb so struct fields can't get renamed Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
		@@ -84,6 +84,9 @@ impl Index for CompanyNameIndex {
 | 
			
		||||
    fn key() -> &'static str {
 | 
			
		||||
        "name"
 | 
			
		||||
    }
 | 
			
		||||
    fn field_name() -> &'static str {
 | 
			
		||||
        "name"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub struct CompanyRegistrationNumberIndex;
 | 
			
		||||
@@ -93,6 +96,9 @@ impl Index for CompanyRegistrationNumberIndex {
 | 
			
		||||
    fn key() -> &'static str {
 | 
			
		||||
        "registration_number"
 | 
			
		||||
    }
 | 
			
		||||
    fn field_name() -> &'static str {
 | 
			
		||||
        "registration_number"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// --- Builder Pattern ---
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user