Saving and loading enums fields in structures to and from the DB

 

I want to store a structure which contains enums in the DB and later retrieve the same.

How are enums mapped to and from the built in DB types?

 
Enum is represented as a 32 bit (u)int.

You can cast them.