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

Incorrect work with multi-table inheritance #32

Open
ruscoder opened this issue Sep 16, 2015 · 1 comment
Open

Incorrect work with multi-table inheritance #32

ruscoder opened this issue Sep 16, 2015 · 1 comment

Comments

@ruscoder
Copy link

ruscoder commented Sep 16, 2015

Hello. I've caught a problem with multi-table inheritance (for example see https://docs.djangoproject.com/en/1.8/topics/db/models/#multi-table-inheritance)
When I tried to invoke bulk_update(Restaurant.objects.all()) I got exceptions such as:

column "name" of relation "app_restaurant" does not exist
LINE 1: UPDATE "app_restaurant" SET "name" = CAST(CASE "place_....
@aykut
Copy link
Owner

aykut commented Jan 29, 2016

Hi,
We could achieve this by making two different SQL updates. Currently, we can update the fields on Restaurant by looking the local_fields on meta but it won't update the fields like name on Place. So it could cause problems.

It would be a cool feature to have.

Thanks.

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

2 participants