Skip to content

CREATE OBJECT AND OBJECT RELATED #418

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

Closed
ramses132 opened this issue Apr 12, 2018 · 2 comments
Closed

CREATE OBJECT AND OBJECT RELATED #418

ramses132 opened this issue Apr 12, 2018 · 2 comments

Comments

@ramses132
Copy link

By default the method to_interval_value(self, data)
Capture the ID if ID is NULL it's raise excepction non primary key I want to create in same view object and its related objects without edit the_interval_value, and validate method... Why is the best practice to make it possible?

@benjaminlong
Copy link

I personally set a fake id to my objet based on the current timestamp. However my object has relations with persisted models in database. So I don't have to worry about related objects without id.

Might not be the best way to allow the serialization, but it works.
I guess in your case, I will add a prefix to your id's object. Not needed thought.

@sliverc
Copy link
Member

sliverc commented Jun 12, 2018

There is #155 discussing this issue. Potentially comment in #404 might also help.

Closing this issue to focus discussion in #155

@sliverc sliverc closed this as completed Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants