-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error with SQLite3 and PyDAL #314
Comments
straight from the book (legacy database section) |
@niphlod in this case it's not a legacy database! |
Yes it is, how do you want pydal to increment your "name" primary key? Richard On Tue, Dec 1, 2015 at 4:20 PM, Maxwell [email protected] wrote:
|
@BuhtigithuB I dont want, I'll define it, before insert the record! |
Can you come over web2py user mailing-list (google group)... I think your web2py is the project that lead to pyDAL and where most user of pyDAL can Regards Richard On Tue, Dec 1, 2015 at 4:33 PM, Maxwell [email protected] wrote:
|
@BuhtigithuB, I'm a member of Web2py forums, from Brazil and Internation, have 15 days that I posted my doubts in this foruns, whithout success! For me this issue is clear around the behavior of PyDAL, how I explained in the web2py forums, the SQL is fully valid, but the statement is bad positioned. https://groups.google.com/forum/#!topic/web2py/uhBIrbemKKI |
you didn't reply either (at least in the default group). Legacy or not legacy, the same limitation applies: you need to use the reference tablename.fieldname notation. |
@niphlod the issue is, in the generated SQL, using CREATE TABLE Entity(
name CHAR(512) NOT NULL UNIQUE,
parent CHAR(512), CONSTRAINT "FK_Entity_parent__constraint" FOREIGN KEY (parent) REFERENCES Schema (name) ON DELETE CASCADE,
parent_name CHAR(512),
parent_entity CHAR(512),
idx INTEGER NOT NULL DEFAULT 1,
label CHAR(512),
entityname CHAR(512),
entitytype CHAR(512),
required CHAR(1),
is_index CHAR(1),
is_unique CHAR(1),
options TEXT,
def_val TEXT,
min DOUBLE,
max DOUBLE,
readonly CHAR(1),
compute CHAR(512),
dependsof CHAR(512),
description TEXT,
PRIMARY KEY(name)) ; This is the manually edited SQL that works CREATE TABLE Entity(
name CHAR(512) NOT NULL UNIQUE,
parent CHAR(512),
parent_name CHAR(512),
parent_entity CHAR(512),
idx INTEGER NOT NULL DEFAULT 1,
label CHAR(512),
entityname CHAR(512),
entitytype CHAR(512),
required CHAR(1),
is_index CHAR(1),
is_unique CHAR(1),
options TEXT,
def_val TEXT,
min DOUBLE,
max DOUBLE,
readonly CHAR(1),
compute CHAR(512),
dependsof CHAR(512),
description TEXT,
PRIMARY KEY(name),
CONSTRAINT "FK_Entity_parent__constraint" FOREIGN KEY (parent) REFERENCES Schema (name) ON DELETE CASCADE)
) ; The |
Any updates? |
I deprecated pydal in favor or peewee, since I could not able to get it working in my project! |
@gi0baro : has this been fixed ? |
@niphlod nope. |
@gi0baro any update? |
is this bug solved? |
Co-authored-by: XpycTee <[email protected]>
Hi All!
I have a very silly model, and I'm getting the below traceback
For replicate this error, you only need define this schema:
The text was updated successfully, but these errors were encountered: