jcrodriguezt / laravel-sybase

Connection and Laravel Eloquent driver for Sybase
GNU General Public License v2.0
2 stars 1 forks source link

Table name 'syscolumns' is ambiguous when trying to insert a row #13

Open elsoftpy opened 5 months ago

elsoftpy commented 5 months ago

When I try to insert a record into a table I get this error

[FreeTDS][SQL Server]SQL Anywhere Error -852: Table name 'syscolumns' is ambiguous (SQLPrepare[0] at ./ext/pdo_odbc/odbc_driver.c:200) (Connection: sybase, SQL: insert into [dummy_table] ([id], [codDestinatario]) values (1, Test)) {"exception":"[object] (Illuminate\Database\QueryException(code: 52W42): SQLSTATE[52W42]: <>: [FreeTDS][SQL Server]SQL Anywhere Error -852: Table name 'syscolumns' is ambiguous (SQLPrepare[0] at ./ext/pdo_odbc/odbc_driver.c:200) (Connection: sybase, SQL: insert into [dummy_table] ([id], [codDestinatario]) values (1, Test)) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:795)

This is the code in the Controller:

        $row = new DummyTable();
        $row->id = $id;
        $row->codDestinatario = 'Test';
        $row->save();

This is my DuumyTable.php file

class DummyTable extends Model
{
    use HasFactory;

    protected $table = 'dummy_table';

    public $timestamps = false;

    protected $fillable = [
        'id',
        'codDestinatario',
    ];
}

Versions

jcrodriguezt commented 3 months ago

Is there any chance you can upgrade to the latest version an try if this is already solved?