>
> >     Make it a computed field? 
> > 
> > 
> > I'm not sure that would be helpful in this case. A computed field 
> > computes its value automatically based on other fields in the record, 
> > but in this case, he needs to pickle an object, which is not one of the 
> > other fields. Also, it needs to be unpickled when queried, which a 
> > computed field wouldn't handle. 
> > 
>
> I haven't used one, but I remember coming across it in the manual. 
> Don't you just pass a lambda when you create the field.  It would 
> seem that you could do anything you want to the value without consulting 
> other fields.
>

Are you talking about a computed field? The compute function only runs if 
you *don't* pass a value to the field -- it calculates a value for the 
field based on the values of *other* fields in the record. Also, it doesn't 
do anything to the value upon query, so wouldn't help with the unpickling 
in this case.

Anthony

-- 



Reply via email to