How can I do below query in Cakephp for bulk data arround 25k
SQL query - If Exists Update Else Insert
if exists (select * from table with (updlock,serializable) where key = @key)
begin
update table set …
where key = @key
end
else
begin
insert into table (key, …)
values (@key, …)
end