MedicOneSystems / MedicOneSystems/livewire-datatables
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bigint: ""
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
I got the error - 'SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bigint: "" ' while adding callback with multiple values
This gives error
------------------------
Column::callback(['name', 'test_id'], function ($name, $test_id) {
return view('companies::livewire.companies-table-edit-action', [
'name' => $name,
'test_id' => $test_id
]);
This works fine
-------------------------
Column::callback(['name', 'address'], function ($name, $address) {
return view('companies::livewire.companies-table-edit-action', [
'name' => $name,
'address' => $address
]);
This works fine
-------------------------
Column::callback(['test_id'], function ($test_id) {
return view('companies::livewire.companies-table-edit-action', [
'test_id' => $test_id
]);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported callback examples, comparing the failing ['name', 'test_id'] case with the working single-value and non-ID cases. Trace how callback values are passed into the query and identify why an empty value reaches a bigint field; done means the multiple-value callback no longer produces the reported SQLSTATE error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100