Re: [fpc-pascal] tiOPF: automapping for m-n relationships

2012-04-02 Thread Graeme Geldenhuys
On 2 April 2012 00:33, leledumbo wrote: > > they're mapped with: > > with gTIOPFManager.ClassDBMappingMgr do begin >  RegisterMapping(TUser,'users','OID','id',[pktDB]); >  RegisterMapping(TUser,'users','Name','name'); >  RegisterMapping(TUser,'users','Password','password'); >  RegisterMapping(TUse

[fpc-pascal] tiOPF: automapping for m-n relationships

2012-04-01 Thread leledumbo
I have the following tables in sqlite (in create table statement): CREATE TABLE users ( id autoinc_int, name varchar(30), password varchar(30) ); CREATE TABLE roles ( id autoinc_int, name varchar(20) ); CREATE TABLE users_roles ( id autoinc_int, user_id int, role_id int, foreig