You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMHO, It would be essential that PrimaryKey() generates automatically an id, it could even depend on the type we are passing, for example :
classEmployee(DataBaseModel):
id: str=PrimaryKey() # could use uuid.uuid4()id: int=PrimaryKey() # could use random.randint(0, 9e99) (just an example, would need something better)
A possibility would also to set PrimaryKey as Optional, what do you think ?
The text was updated successfully, but these errors were encountered:
I probably answered this question in #5 , where you would need to use PrimaryKey(default=) passing in an argument-less method that will be used to generate almost any type of data at instantiation.
IMHO, It would be essential that
PrimaryKey()
generates automatically an id, it could even depend on the type we are passing, for example :A possibility would also to set PrimaryKey as Optional, what do you think ?
The text was updated successfully, but these errors were encountered: