Re: Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-14 Thread Alex Gaynor
On Tue, Apr 14, 2009 at 6:00 PM, gordyt wrote: > > I think I've tracked down the problem. Here is a bit of code from > django.db.models.fields.related.py: > >def get_db_prep_lookup(self, lookup_type, value): ># If we are doing a lookup on a Related Field, we must

Re: Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-14 Thread gordyt
Here is a dpaste link to that same bit of code that looks nicer: http://dpaste.com/hold/33474/ --gordy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-14 Thread gordyt
I think I've tracked down the problem. Here is a bit of code from django.db.models.fields.related.py: def get_db_prep_lookup(self, lookup_type, value): # If we are doing a lookup on a Related Field, we must be # comparing object instances. The value should be the PK of

Re: Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-14 Thread gordyt
Howdy Daniel! > I suspect you have not set the subclass's metaclass to > models.SubfieldBase - see > here:http://docs.djangoproject.com/en/dev/howto/custom-model-fields/#the-s... > > You need to do this to get any of the overridden methods to be called. Thanks for the update, but that isn't

Re: Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-13 Thread Daniel Roseman
On Apr 13, 7:25 pm, gordyt wrote: > Howdy Folks, > > I have been testing model inheritance using models that have UUIDField > primary keys.  It appears that when you save a new instance of a child > model, the framework is not calling get_db_prep_value() to convert the >

Re: Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-13 Thread gordyt
Forgot to add that I'm using the latest revision from subversion (10558)... --~--~-~--~~~---~--~~ 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

Custom Model Fields / Multi-table inheritance / get_db_prep_value / postgresql_psycopg2

2009-04-13 Thread gordyt
Howdy Folks, I have been testing model inheritance using models that have UUIDField primary keys. It appears that when you save a new instance of a child model, the framework is not calling get_db_prep_value() to convert the UUIDField to a proper format before querying the parent entry. Let's