Reconnect only in case of OperationalError. Added function to retrieve last inserted ID.
Reconnect only in case of OperationalError.
Added function to retrieve last inserted ID.

inveniosoftware/invenio,tiborsimko/invenio,inveniosoftware/invenio,tiborsimko/invenio