Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to get an instance id on TypedModels, without saving first #223

Open
milanmitrovic opened this issue Mar 10, 2024 · 0 comments
Open

Comments

@milanmitrovic
Copy link

As in the title, I have a TypedModel and want to access the id field. The field gets populated after I save, but I would like to avoid one extra write just to get an id. I saw in the docs that for regular Model instances the id field is populated on creation, and you don't need to save the data to get an id. I would like to have the same functionality on TypedModels, but I don't know what is the simplest way to do that.

Can you help me out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant