Massimo,

Will it be possible to have a foreign key on a non id field, in case
of a look-up table?

In my model I have:

db.define_table('rechtsvorm',
    SQLField('rechtsvorm',label='Rechtsvorm *
',length=42,default='',notnull=True,unique=True),
    migrate=False)


db.define_table('bedrijf',
    SQLField(..),
    SQLField('rechtsvorm',length=42,default='Onbekend'),
    SQLField(..),
    migrate=False)


db.bedrijf.rechtsvorm.requires=IS_IN_DB(db,db.rechtsvorm.rechtsvorm,'%
(rechtsvorm)s')


It would be nice to have db.rechtsvorm.rechtsvorm directly in the
field definition and have the DAL create a foreign key constraint.


Kind regards,

Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to