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

OrderItem's product_reference is a CharField #145

Closed
twoolie opened this issue Feb 27, 2012 · 3 comments
Closed

OrderItem's product_reference is a CharField #145

twoolie opened this issue Feb 27, 2012 · 3 comments

Comments

@twoolie
Copy link
Contributor

twoolie commented Feb 27, 2012

This may not seem like a bad thing now, but it becomes a problem if you ever want to do analysis on that data ( see airtonix/cmsplugin-shop#1 ).

Is there any reason why this would not be a ForeignKey with on_delete=[NULL|PROTECT] ? This would allow ORM querying as expected and also preserve OrderItems when Products are deleted.

I would be happy to submit patches/tests if needed.

@zeus
Copy link
Contributor

zeus commented Feb 27, 2012

@twoolie
Copy link
Contributor Author

twoolie commented Feb 28, 2012

Apologies, I must have glossed over it. Is there any reason why product_reference still exists then?

@zeus
Copy link
Contributor

zeus commented Feb 28, 2012

Compatibility with old installations?

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

3 participants