Name of the primary key is not id
See original GitHub issueAjax result if the primary key is not “id”(lowercase) cannot choose example
[
{
"Id":1,
"UserName":"jay1",
"Age":"18"
},{
"Id":2,
"UserName":"jay2",
"Age":"18"
},{
"Id":3,
"UserName":"jay3",
"Age":"18"
},{
"Id":4,
"UserName":"jay4",
"Age":"18"
},{
"Id":5,
"UserName":"jay5",
"Age":"18"
}
]
Just like the above example, if does not contain the attribute “id”(lowercase), select2 will not be able to work, how do I custom primary keys, or when there is no attribute “id” how to make select2 work normally
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why is naming a table's Primary Key column “Id ... - Quora
Naming a table's primary key column by “id” is not a bad practice, but a database can have many tables, naming all of...
Read more >Why is naming a table's Primary Key column "Id" considered ...
The Id column is special; it is the primary key. Any table can have any number of foreign keys, but it can have...
Read more >Is it better to name the primary key column id or *_id?
I always use the verbose form (i.e. 'employee_id' rather than 'id') as it is more descriptive. If you are joining more than one...
Read more >Add or change a table's primary key in Access
A primary key is a field or set of fields with values that are unique throughout a table. Values of the key can...
Read more >The Ultimate Guide To Primary Key - SQLite Tutorial
This tutorial shows you how to use SQLite PRIMARY KEY constraint to ... CREATE TABLE countries ( country_id INTEGER PRIMARY KEY, name TEXT...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pedrofurtado That’s great!Very looking forward to
@pedrofurtado hey guy.Has this program been adopted?