Re: [web2py] Re: enforcing a one-to-one relationship

2010-01-11 Thread Jeff Bauer
Still fails for me on a record update: 'value already in database' -Jeff On 01/10/2010 09:53 PM, mdipierro wrote: That is easy to fix. In fact it is now fixed in trunk. On Jan 10, 9:42 pm, Jeff Bauer wrote: There's a further problem here. The scheme below also prevents socdiag from ever

Re: [web2py] Re: enforcing a one-to-one relationship

2010-01-10 Thread Jeff Bauer
There's a further problem here. The scheme below also prevents socdiag from ever being updated, because once the record is created then IS_NOT_IN_DB always fails. -Jeff On 01/10/2010 09:28 AM, mdipierro wrote: Good point. Perhaps the _and solution is not a good one. On Jan 10, 7:59 am, Jeff B

Re: [web2py] Re: enforcing a one-to-one relationship

2010-01-10 Thread Jeff Bauer
Working from changeset 94:4fd248d09b52, the unique column is enforced, but the dropdown is missing. It is replaced by a text (string) entry field. If I add the following code to db.py, the dropdown reappears: db.socdiag.socform.requires = \ IS_IN_DB(db, 'socform.id', _and=IS_NOT_IN_DB(d