sqlmodel
sqlmodel copied to clipboard
SQL databases in Python, designed for simplicity, compatibility, and robustness.
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
According to [SQLAlchemy's Generic Type Document](https://docs.sqlalchemy.org/en/14/core/type_basics.html#sqlalchemy.types.Enum) Python's class inherit from **enum.Enum** should be wrapped with **sqlalchemy.sql.Enum(sqlalchemy.sql.sqltypes.Enum)** when it is set to sqlalchemy.Column()'s type_ field.
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
Fixes: #189 Original Solution found in https://github.com/tiangolo/sqlmodel/issues/189#issuecomment-1025190094 from @leynier
### First Check - [X] I added a very descriptive title to this issue. - [X] I used the GitHub search to find a similar issue and didn't find it....
Looking at the `Hero` Class, it seems that `Relationship` Weapon `back_populates` to `owner`. But in the `Weapon` class, there's no `owner` field, but hero.