Database: fetch inserted row only if primary key is available [closes #1342]

Fixed BC with Nette 2.0.x