If I do getLastInsertId() immediately after a save(), it works, but otherwise it does not. This is demonstrated in my controller:
getLastInsertId()
save()
f
each time you perform an insert operation on any model, cake internally fetchesthe last insert Id and Sets to Model->id attribute.
so one can access it directly by $Model->id;, no need to query again for lastInsertId.