I have tried this many different ways and have yet to be successful. Making a Many-to-many query is easy, and displaying the data is easy, but how do I use SQLFORM with a M-M relationship!?
-Thadeus On Tue, Sep 15, 2009 at 12:08 PM, Thadeus Burgess <[email protected]>wrote: > How would you go about using SQLFORM on a database object that has a many > to many relationship. > > My current model displays correctly, however it errors on submit. > > Thanks for the help! > > """ > Table definition > """ > db.define_table("room", > Field("name", "string"), > Field("size", "integer")) > > """ > Table definition > > db.table.field.requires=IS_IN_DB(db,'othertable.id > ','%(otherfield)',multiple=True) > """ > db.define_table("study", > Field("number", "string"), > Field("rooms", db.room, requires=IS_IN_DB(db, 'room.id', 'room.name', > multiple=True)), > ) > > TypeError: int() argument must be a string or a number, not 'list' > > > -Thadeus > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

