if "password" and "role" are reserved keywords, then there is a huge issue
because what needs to be changed is how auth creates the scheme by default
(and I don't see it happening in web2py for a small percentage of firebird
users)...
One thing at a time though. We need to figure out the problem when creating
the id (assuming your initial report still stands)
BTW
Field('id', 'integer', notnull=True),
should be
Field('id', 'id', notnull=True)
so you can skip the primarykey definition.
Once that works fine, please send out the sql.log generated, so we can fix
the 'id' creation at DAL side: if you're correct about the report, then all
tables created by DAL can't work (because every table created by DAL by
default has a PK defined as 'id').
Then, I think you can use the super-experimental new feature in dal that is
called "rname".
Basically the "model" of the table remains fixed, but the name of the table
(or of the fields) are "translated" to rname when talking to the backend.
Currently it's tested only in SQLite, Postgresql, Mysql and MSSQL.
That being said, what you need practically is to replace any field that is
a "reserved keyword" in Firebird with something that isn't, passing the
name of the field. You can try passing the already quoted "password" string
Field('password', ....., rname='"password"')
or choose a totally different one, such as
Field('password', ....., rname='"a_totally_different_one"')
(watch out the quotes..... there are two single quotes to delimit the
variable name in python.... the variable is the name of the column
surrounded by double quotes, that are passed as they are to the backend)
DAL will still work with this table, but when asking for
db.table.password == 'a'
what will happen is
WHERE "a_totally_different_one" = 'a'
BTW: why the need to work with firebird 1.6 since 2.5.2 is out ?
One thing is trying to access a legacy table.....but why bother creating
tables for the app in a really old backend that is only going to provide
more and more headaches?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.