Delete Row
Delete Row
blabablaba
Posts: 47Questions: 19Answers: 0
in Editor
Hi, I was wondering why DataTables sends entire row data on delete as opposed to just the Primary Key.
The best I could think of was that it is a security measure to check the row is identical before it is deleted?
What are your thoughts?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Originally Editor didn't, as I also couldn't see the point in it. But there are enough requests for that feature that I put it in (I think it was around v1.5). Our PHP, .NET and NodeJS libraries don't use anything other than the primary key.
I think folks were using the row's data for validation and logging - my preference is just to read it from the db from the pkey on delete though.
Allan
Hi Allan,
Is there a setting to send only the primary key?
In the absence of a setting, I added the following (in case it's of use to others):
If there is no setting, does the above seem a reasonable approach?
Steve