[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-07-30 Thread Ivan
It seems this bug is still present in 2.9.5 Il giorno venerdì 24 gennaio 2014 03:19:05 UTC+1, User ha scritto: Thanks. Here is the issue in case anyone is interested: http://code.google.com/p/web2py/issues/detail?id=1395 On Wednesday, January 22, 2014 3:39:56 PM UTC-5, Anthony wrote:

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-01-23 Thread User
Thanks. Here is the issue in case anyone is interested: http://code.google.com/p/web2py/issues/detail?id=1395 On Wednesday, January 22, 2014 3:39:56 PM UTC-5, Anthony wrote: This is a bug, and an issue has been created. Yes, you should be able to make the change directly in the database.

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-01-22 Thread User
I also would like a non-null foreign key reference, but like OP experienced web2py will not create one. Why is this? And is there a workaround to make reference fields not null? Or worst case can I add the not null constraint manually in the db without breaking anything? On Tuesday, June

Re: [web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-01-22 Thread Richard Vézina
Of cours you can change you db manually with SQL DLL... You can still adjust your web2py model and do fake_migrate=True, migrate=False to get thing in sync... Richard On Wed, Jan 22, 2014 at 1:13 PM, User sourci...@gmail.com wrote: I also would like a non-null foreign key reference, but like

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2014-01-22 Thread Anthony
This is a bug, and an issue has been created. Yes, you should be able to make the change directly in the database. Anthony On Wednesday, January 22, 2014 1:13:30 PM UTC-5, User wrote: I also would like a non-null foreign key reference, but like OP experienced web2py will not create one (I'm

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2012-06-19 Thread Ivan
Same problem here! The notnull=True parameter doesn't append the NOT NULL clause for reference fields. The IS_IN_DB function activates the check at form-level while the notnull parameter should set the constraint at db-level.

[web2py] Re: foreign key reference and not null mutually exclusive. by design, or a bug?

2011-12-08 Thread Cliff
Check out IS_IN_DB and IS_NOT_IN_DB here: http://www.web2py.com/book/default/chapter/07#Database-Validators Are you creating the tables in native SQLite? On Dec 8, 3:22 pm, nick name i.like.privacy@gmail.com wrote: I want to have a non-null foreign key reference, e.g. owner =