Surely the problem is much bigger than just changing the field type?
In general, you are going to need a varchar or something, and then
you will need a way of mapping between your primary key values and
the value stored in the object-id field. But in order for the
GenericForeignKey queries to work it will need to know about this
mapping.
The GenericForeignKey stuff actually comes in part from one of my own
projects, and I have this case of non-integer primary keys. In order
to handle it, I have to register 'mappers' for every model that the
GenericForeignKey handles. It's a bit messy, and not at all
compatible with the GenericForeignKey in Django.
Basically, the GenericRelation stuff can't be used with models that
don't have integer primary keys without rewriting parts of it AFAICS.
Luke
--
"Mediocrity: It takes a lot less time, and most people don't realise
until it's too late." (despair.com)
Luke Plant || http://lukeplant.me.uk/
True. That's pretty much unavoidable, too. Handling arbitrary content
types is way too complex to be worth it. I've put a fair bit of thought
into the possibilities there because it crops up in a few disguises,
but it's a briar patch full of trouble.
> Shall I add a ticket for this and add a patch for the documentation to
> include such a remark?
Well, that depends. Would you like the problem to be fixed or not? :-)
Malcolm