That worked, thank you.
On Feb 20, 8:09 pm, mdipierro <[email protected]> wrote: > db.define_table('some', > SQLField('name', 'string'), > SQLField('parent', 'referece some')) > > On Feb 20, 6:01 pm, Jaime Barciela <[email protected]> wrote: > > > Hello all, > > > I have not found answers for these two questions in the manual or the > > site: > > > 1.- In a many-to-many relationship you end up with a "friendship" kind > > of table, how can you avoid duplicates in that table without defining > > a custom index? > > > 2.- A typical -- not the only one -- implementation of a tree in a > > RDBMS is a table with a foreign key pointing to its own primary key. I > > tried something like this: > > > db.define_table('some', > > SQLField('name', 'string'), > > SQLField('parent', db.some)) > > > but I get an error because db.some is not defined yet when referenced > > by 'parent'. > > > How can you implement references to self in the DAL? > > > Thanks! > > Jaime > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---

