hi,

yesterday i was bitten by something in the manipulator-behaviour, which 
i did not really expect to work that way...and i'm now not sure if i 
should submit a bugreport, or it should behave like that. also, it's 
quite possible that i understood this wrong, if that's the case please 
correct me.

let's say you have a model called Owner, that references using a 
foreignkey a Thing.

=====================
class Thing(Model):
      name = CharField(maxlength=500)
=====================


=====================
class Owner(Model):
      name = CharField(maxlength=500)
      thing = ForeignKey(Thing)
=====================

now let's say you have a LOT of Things... like 50000.

now, when you call Owner.AddManipulator(), he's going to fetch the WHOLE 
  Thing-table. just to construct the AddManipulator.

(well, i REALLY hope that's not the case, but from the db-queries it 
seems so)

i understand that if you want to build later a select-box from this 
data, then you need all the Thing objects, but in my case that will 
never happen.

and to validate it's input i think it's absolutely unnecessary to load 
in the whole table.

to build the error-message, yes, there it might need it. but only when 
he really has to build the error message.

so, should i report this as a bug, or is this behavior intentional?

also, while we're at it... is there a workaround?
i tried to experiment with the "follow" parameter, to have the 
manipulator ignore the thing_id field, and seems to help in the 
ChangeManipulator case, but in the AddManipulator case it does not help, 
because then i cannot save the object.

is there a way to tell the manipulator to take some additional data for 
the object-save?


thanks,
gabor

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to