> By the way, I can get around this by changing this line in 
> MongoDBAdapter's insert function in dal.py:
> values[fieldname] = self.object_id(v)
>
> to this:
> if isinstance(v,list):
>     values[fieldname] = [self.object_id(x) for x in v]
> else:
>     values[fieldname] = self.object_id(v)
>

I think there's no working implementation available for list:reference 
types and MongoDB yet, but your patch looks fine.
BTW: Have you tried calling table.update instead of insert with 
list:reference?
Also the insert and update methods could support other types of iterables 
as input.



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to