Closed MikhailDunaev closed 7 months ago
It seams strange that I can not config primary key outside the Model class.
class MyModel(BaseModel): some_fld ... class Meta: primary_key = False
my_meta = MyModel._meta my_meta.primary_key = CompositeKey('id', 'some_fld')
I want to config tables by myself in such a way (partitionig).
You'll need to figure it out yourself, but you can dynamically create the classes either inside a function or using type().
type()
It seams strange that I can not config primary key outside the Model class.
class MyModel(BaseModel): some_fld ... class Meta: primary_key = False
my_meta = MyModel._meta my_meta.primary_key = CompositeKey('id', 'some_fld')
I want to config tables by myself in such a way (partitionig).