DanielTosello / ATK4-tools

A collection of library plugins and other bits and pieces for the ATK4 framework - Includes DB/dsql/dblib for MSSQL/FreeTDS
GNU Affero General Public License v3.0
0 stars 1 forks source link

Empty Insert List #1

Open cslkim opened 9 years ago

cslkim commented 9 years ago

Hi

I am testing the dblib Extension. In my config File, the DSN had to start with "dblib:" instead of "freetds".

After I am adding a new Model, I set a value and run save() (with DEBUG enabled):

16 $m = $MyAPI->add('Model_TestTable')->debug()->set("telephone", 12345); 17 echo print_r($m->get()); 18 $m->save();

insert into dbo.TestTable () values () []

Database Query Failed#0 /var/www/html/MSSQL/atk4/lib/DB/dsql.php(1519): AbstractObject->exception('Database Query ...')

1 /var/www/html/MSSQL/atk4/lib/DB/dsql.php(1546): DB_dsql->execute()

2 /var/www/html/MSSQL/atk4/lib/SQL/Model.php(599): DB_dsql->insert()

3 /var/www/html/MSSQL/atk4/lib/SQL/Model.php(574): SQL_Model->insert()

4 /var/www/html/MSSQL/lib/Model/Table.php(17): SQL_Model->save()

5 /var/www/html/MSSQL/testMarketplace.php(18): Model_Table->save()

DanielTosello commented 9 years ago

Hey :)

Thanks for the input. The lib was only supposed to work with the underlying freetds libraries... i will look into extending the capability to cover dblib as well, but it may take me a little time.