Support for MySQL Set Type (choices wont work)
cian-dev10 opened this issue · 1 comments
cian-dev10 commented
Hey, I'm trying to find a solution how to use the MySQL SET field column type in the model of ormar.
How about adding a new field called ormar.SetField (it should inherit from enum.IntFlag). Choices wont work btw.
How about this implementation:
from enum import IntFlag
class SetFieldClass(IntFlag):
A = 1
B = 2
import ormar
ormar.SetField(type_class=SetFieldClass)?
collerek commented
There already is an Enum
field type and if I recall correctly the sqlalchemy picks the corresponding underlying field type based on the dialect used.