> MyModel.objects.extra(select={'rowid': "rowid || ''"})
>
Thanks. I don't think extra() takes primary_key=True, does it?
I wouldn't want Django to auto-add column id otherwise.

Assuming I have:
MyModel.objects.extra(select={'id': "rowid || ''"})
OK, that's fine for fetching the ID itself, suitable for creating
forms. But what if I want to fetch an item by this virtual PK, or
update by PK with or without prior fetching?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to