[2.0][DDC-79][DDC-261] Fixed. Also fixed support for deleting objects by reference (getReference() + remove() + flush()) to effectively delete objects without loading them.