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:
@@ -169,6 +169,10 @@ pub fn model(_attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
fn key() -> &'static str {
|
||||
#index_key
|
||||
}
|
||||
|
||||
fn field_name() -> &'static str {
|
||||
#name_str
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user