You are not logged in.
I use follow code create mORMot auth table in mairab 5.5.50 database:
fConn := TODBCConnectionProperties.Create('',RawUTF8(connectionString), '', '');
fModel := TSQLModel.Create([TSQLAuthGroup,TSQLAuthUser, ...]);
VirtualTableExternalMap(fModel, TSQLAuthGroup, fConn, 'mormot_auth_group');
VirtualTableExternalMap(fModel, TSQLAuthUser, fConn, 'mormot_auth_user');
fRestServer := TSQLRestServerDB.Create(fModel, ':memory:', False); // authentication=false
fRestServer.AuthenticationRegister(TSQLRestServerAuthenticationDefault);
fRestServer.CreateMissingTables;
When I run these code, it create AuthGroup,AuthUser table correctly, but the log report error:
ESQLite3Exception {"ErrorCode":1,"SQLite3ErrorCode":2,"Message":"Error SQLITE_ERROR (1) [SELECT RowID FROM AuthUser LIMIT 1] using 3.13.0 - no such table: AuthUser, extended_errcode=1"} at 006A4D6E stack trace API 005E4350 005E4378
The C/S application can work fine, and the mORMot default groups, users created correctly. I drop the mormot_auth_group,mormot_auth_user, run again, the error still reported! I change the code:
VirtualTableExternalMap(fModel, TSQLAuthGroup, fConn, 'AuthGroup');
VirtualTableExternalMap(fModel, TSQLAuthUser, fConn, 'AuthUser');
Nothing help ,but the error .
What's wrong with my codes? any clue? thanks lots !
Offline