Moh
11/12/2021, 1:10 AMenum paddock_slope_enum {
One__0____7__ @map("One (0° - 7°)")
Two__8____15__ @map("Two (8° - 15°)")
Three__16____25__ @map("Three (16° - 25°)")
Four___26__ @map("Four (>26°)")
}
The generated enum becomes:
export const paddock_slope_enum: {
One__0____7__: 'One__0____7__',
Two__8____15__: 'Two__8____15__',
Three__16____25__: 'Three__16____25__,
Steep_Hill___26__: 'Steep_Hill___26__'
};
This is unexpected for me as I would have expected the values of the enum keys to be the map values in the schema?
So my findMany GET API is returning the values with all the underscores - why is that? And can I get around it to get the value of the map?Ryan
11/12/2021, 5:58 AM@map
. Map is just the name that you want to store in the database. If you need the database value, then you have to go for a raw query.Moh
11/14/2021, 8:57 PMRyan
11/15/2021, 5:49 AM@map
at the database level.