Welcome Guest, Not a member yet? Register   Sign In
"soft" delete
#3

[eluser]gRoberts[/eluser]
I wrote my own base_model which exposese simple methods to get/set data.

Get - Returns ALL records
GetActive - Returns all records where Removed is null
Save - Inserts or Updates depending on primary key existance
Remove - Sets the Removed Column to the current date and saves.

Any additional functions use the above methods as a base. This way, i can ensure, that the data I am getting
truncates any rows that are marked as removed.


Messages In This Thread
"soft" delete - by El Forum - 07-01-2011, 03:18 AM
"soft" delete - by El Forum - 07-01-2011, 04:04 AM
"soft" delete - by El Forum - 07-01-2011, 04:10 AM
"soft" delete - by El Forum - 07-02-2011, 12:38 PM
"soft" delete - by El Forum - 07-02-2011, 01:55 PM
"soft" delete - by El Forum - 06-18-2013, 11:25 PM
"soft" delete - by El Forum - 06-19-2013, 12:59 AM
"soft" delete - by El Forum - 06-19-2013, 02:59 AM
"soft" delete - by El Forum - 06-19-2013, 04:20 AM
"soft" delete - by El Forum - 06-19-2013, 04:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB