This might give you some 
ideas: 
http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables. 
I suppose you would have to loop through the list of submitted authors to 
insert multiple records into the "verb" table.

Anthony

On Monday, January 16, 2012 3:35:16 PM UTC-5, Christian Winterhager wrote:
>
> One of the standard examples  of many-to-many Relations is a library. For 
> simplicity i choose only 3 Tables:
>
> db.define_table ('author',
>     Field ('name', 'string', length=100))
>
> db.define_table ('verb',
>    Field ('bnr', db.book ),  
>    Field ('anr', db.author ), 
>     )
>
> db.define_table ('book',
>     Field('title', 'string', length=250))
>
> It is very easy to insert a new book, one or more author and the 
> corresponding record
> in the table "verb". But i found no way to insert a book with the 
> CRUD-Method. The 
> complexity<http://dict.leo.org/ende?lp=ende&p=DOKJAA&search=complexity&trestr=0x8001>
> is that i first must insert a row into  table "book", then one into table 
> "author" and last i have to connect
> the inserted rows with the corresponding numbers 'bnr' and 'anr' in table 
> "verb". Does anyone know if there
> is a way to do that with CRUD?
>
>
>  
>
>

Reply via email to